diff options
| author | Marek Vasut <[email protected]> | 2025-03-02 02:24:52 +0100 |
|---|---|---|
| committer | Marek Vasut <[email protected]> | 2025-03-11 23:06:18 +0100 |
| commit | 33ccfae85372285690d8bd8256d994d7cb917cbf (patch) | |
| tree | 9351f8384fd4986cc0709e5f338268f342681ef1 | |
| parent | 256306593ecdde5fe01ecc5108d564e76ea8ba65 (diff) | |
net: miiphybb: Drop mdio_init()
Inline mdio_init() back into mdio_alloc(), separate
access to mdio_init() is no longer necessary.
Signed-off-by: Marek Vasut <[email protected]>
Reviewed-by: Paul Barker <[email protected]>
| -rw-r--r-- | common/miiphyutil.c | 13 | ||||
| -rw-r--r-- | include/miiphy.h | 1 |
2 files changed, 4 insertions, 10 deletions
diff --git a/common/miiphyutil.c b/common/miiphyutil.c index 3d960c259b5..274e88a4921 100644 --- a/common/miiphyutil.c +++ b/common/miiphyutil.c @@ -55,14 +55,6 @@ struct mii_dev *miiphy_get_dev_by_name(const char *devname) return NULL; } -void mdio_init(struct mii_dev *bus) -{ - memset(bus, 0, sizeof(*bus)); - - /* initialize mii_dev struct fields */ - INIT_LIST_HEAD(&bus->link); -} - struct mii_dev *mdio_alloc(void) { struct mii_dev *bus; @@ -71,7 +63,10 @@ struct mii_dev *mdio_alloc(void) if (!bus) return bus; - mdio_init(bus); + memset(bus, 0, sizeof(*bus)); + + /* initialize mii_dev struct fields */ + INIT_LIST_HEAD(&bus->link); return bus; } diff --git a/include/miiphy.h b/include/miiphy.h index dc8ae0caca6..00d0b9b6a43 100644 --- a/include/miiphy.h +++ b/include/miiphy.h @@ -42,7 +42,6 @@ struct phy_device *mdio_phydev_for_ethname(const char *devname); void miiphy_listdev(void); -void mdio_init(struct mii_dev *bus); struct mii_dev *mdio_alloc(void); void mdio_free(struct mii_dev *bus); int mdio_register(struct mii_dev *bus); |
