Inline mdio_init() back into mdio_alloc(), separate
access to mdio_init() is no longer necessary.

Signed-off-by: Marek Vasut <marek.vasut+rene...@mailbox.org>
---
Cc: Jim Liu <jim.t90...@gmail.com>
Cc: Joe Hershberger <joe.hershber...@ni.com>
Cc: Mario Six <mario....@gdsys.cc>
Cc: Michael Chang <zhang971090...@gmail.com>
Cc: Nobuhiro Iwamatsu <iwama...@nigauri.org>
Cc: Parvathi Bhogaraju <pbhogar...@microsoft.com>
Cc: Paul Barker <paul.barker...@bp.renesas.com>
Cc: Ramon Fried <rfried....@gmail.com>
Cc: Tom Rini <tr...@konsulko.com>
Cc: u-boot@lists.denx.de
---
 common/miiphyutil.c | 13 ++++---------
 include/miiphy.h    |  1 -
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/common/miiphyutil.c b/common/miiphyutil.c
index 2a034d3a77c..1298f07815e 100644
--- a/common/miiphyutil.c
+++ b/common/miiphyutil.c
@@ -65,14 +65,6 @@ void miiphy_init(void)
        current_mii = 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;
@@ -81,7 +73,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 5930fa1b1c9..b4cad2c636f 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -44,7 +44,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);
-- 
2.47.2

Reply via email to