[PATCH 05/11] net: miiphybb: Drop priv from struct bb_miiphy_bus

Marek Vasut marek.vasut+renesas at mailbox.org
Sun Mar 2 02:24:46 CET 2025


Remove the priv member from struct bb_miiphy_bus and its assignment
from drivers. This turns struct bb_miiphy_bus int struct mii_dev
wrapper, to be cleaned up next.

Signed-off-by: Marek Vasut <marek.vasut+renesas at mailbox.org>
---
Cc: Jim Liu <jim.t90615 at gmail.com>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Cc: Mario Six <mario.six at gdsys.cc>
Cc: Michael Chang <zhang971090220 at gmail.com>
Cc: Nobuhiro Iwamatsu <iwamatsu at nigauri.org>
Cc: Parvathi Bhogaraju <pbhogaraju at microsoft.com>
Cc: Paul Barker <paul.barker.ct at bp.renesas.com>
Cc: Ramon Fried <rfried.dev at gmail.com>
Cc: Tom Rini <trini at konsulko.com>
Cc: u-boot at lists.denx.de
---
 board/gdsys/a38x/ihs_phys.c | 3 ---
 drivers/net/ravb.c          | 3 ---
 drivers/net/sh_eth.c        | 3 ---
 include/miiphy.h            | 1 -
 4 files changed, 10 deletions(-)

diff --git a/board/gdsys/a38x/ihs_phys.c b/board/gdsys/a38x/ihs_phys.c
index 86a4049238b..7aa427e0312 100644
--- a/board/gdsys/a38x/ihs_phys.c
+++ b/board/gdsys/a38x/ihs_phys.c
@@ -257,9 +257,6 @@ int register_miiphy_bus(uint k, struct mii_dev **bus)
 	mdiodev->write = mii_bb_miiphy_write;
 	mdiodev->priv = &gpio_mii_set[k];
 
-	/* Copy the bus accessors and private data */
-	bb_miiphy->priv = &gpio_mii_set[k];
-
 	retval = mdio_register(mdiodev);
 	if (retval < 0)
 		return retval;
diff --git a/drivers/net/ravb.c b/drivers/net/ravb.c
index 52547b27aff..dcd8ba9283f 100644
--- a/drivers/net/ravb.c
+++ b/drivers/net/ravb.c
@@ -601,9 +601,6 @@ static int ravb_probe(struct udevice *dev)
 	mdiodev->priv = eth;
 	snprintf(mdiodev->name, sizeof(mdiodev->name), dev->name);
 
-	/* Copy the bus accessors and private data */
-	bb_miiphy->priv = eth;
-
 	ret = mdio_register(mdiodev);
 	if (ret < 0)
 		goto err_mdio_register;
diff --git a/drivers/net/sh_eth.c b/drivers/net/sh_eth.c
index c898a2204d8..c2e2f3fc6c6 100644
--- a/drivers/net/sh_eth.c
+++ b/drivers/net/sh_eth.c
@@ -763,9 +763,6 @@ static int sh_ether_probe(struct udevice *udev)
 	mdiodev->priv = eth;
 	snprintf(mdiodev->name, sizeof(mdiodev->name), udev->name);
 
-	/* Copy the bus accessors and private data */
-	bb_miiphy->priv = eth;
-
 	ret = mdio_register(mdiodev);
 	if (ret < 0)
 		goto err_mdio_register;
diff --git a/include/miiphy.h b/include/miiphy.h
index c9128a641dd..097c46c27bf 100644
--- a/include/miiphy.h
+++ b/include/miiphy.h
@@ -76,7 +76,6 @@ struct bb_miiphy_bus_ops {
 };
 
 struct bb_miiphy_bus {
-	void *priv;
 	struct mii_dev mii;
 };
 
-- 
2.47.2



More information about the U-Boot mailing list