All the resources needed by this .init callback should already
be available by the time probe function runs, simply call the
init callback directly and set the bb_miiphy init callback to
NULL. This shouldn't break anything on this hardware, but would
be nice if someone could double-check and test that.

Signed-off-by: Marek Vasut <[email protected]>
---
Cc: Christian Marangi <[email protected]>
Cc: Evgeny Bachinin <[email protected]>
Cc: Ilias Apalodimas <[email protected]>
Cc: Jerome Forissier <[email protected]>
Cc: Joe Hershberger <[email protected]>
Cc: Mario Six <[email protected]>
Cc: Michal Simek <[email protected]>
Cc: Nobuhiro Iwamatsu <[email protected]>
Cc: Paul Barker <[email protected]>
Cc: Ramon Fried <[email protected]>
Cc: Simon Glass <[email protected]>
Cc: Sughosh Ganu <[email protected]>
Cc: Tom Rini <[email protected]>
Cc: [email protected]
---
 board/gdsys/a38x/ihs_phys.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 2b598abb7f0..0c2c0a54598 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -234,7 +234,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
        mdiodev->write = bb_miiphy_write;
 
        /* Copy the bus accessors and private data */
-       bb_miiphy->init = mii_mdio_init;
+       bb_miiphy->init = NULL;
        bb_miiphy->mdio_active = mii_mdio_active;
        bb_miiphy->mdio_tristate = mii_mdio_tristate;
        bb_miiphy->set_mdio = mii_set_mdio;
@@ -248,7 +248,7 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
                return retval;
        *bus = miiphy_get_dev_by_name(mdiodev->name);
 
-       return 0;
+       return mii_mdio_init(bb_miiphy);
 }
 
 struct porttype *get_porttype(uint octo_phy_mask, uint k)
-- 
2.45.2

Reply via email to