summaryrefslogtreecommitdiff
path: root/drivers/net/designware.c
diff options
context:
space:
mode:
authorMarek Vasut <marek.vasut+renesas@mailbox.org>2025-02-22 21:33:29 +0100
committerMarek Vasut <marek.vasut+renesas@mailbox.org>2025-02-26 18:26:57 +0100
commita23f9a786b010177839d6fe9f67c717f17f74368 (patch)
treed74017635b6aa4fb67bc186fcdc887cf77200d5f /drivers/net/designware.c
parented4ab7c5e0e9e85c369bb6f7f2f5316788102e2c (diff)
net: miiphybb: Drop name field from struct bb_miiphy_bus
The struct bb_miiphy_bus embeds struct struct mii_dev, which already contains one copy of name field. Drop the duplicate top level copy of name field. The a38x code does static assignment of disparate names, use snprintf(...) to fill in matching name in probe to avoid any breakage. Reviewed-by: Paul Barker <paul.barker.ct@bp.renesas.com> Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Diffstat (limited to 'drivers/net/designware.c')
-rw-r--r--drivers/net/designware.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/net/designware.c b/drivers/net/designware.c
index 74cf8271e67..5124982e683 100644
--- a/drivers/net/designware.c
+++ b/drivers/net/designware.c
@@ -292,7 +292,6 @@ static int dw_eth_bb_delay(struct bb_miiphy_bus *bus)
struct bb_miiphy_bus bb_miiphy_buses[] = {
{
- .name = BB_MII_DEVNAME,
.mdio_active = dw_eth_bb_mdio_active,
.mdio_tristate = dw_eth_bb_mdio_tristate,
.set_mdio = dw_eth_bb_set_mdio,
@@ -340,7 +339,6 @@ static int dw_bb_mdio_init(const char *name, struct udevice *dev)
bb_miiphy_buses[0].priv = dwpriv;
snprintf(bus->name, sizeof(bus->name), "%s", name);
- strlcpy(bb_miiphy_buses[0].name, bus->name, MDIO_NAME_LEN);
bus->read = bb_miiphy_read;
bus->write = bb_miiphy_write;
#if CONFIG_IS_ENABLED(DM_GPIO)
@@ -348,14 +346,13 @@ static int dw_bb_mdio_init(const char *name, struct udevice *dev)
#endif
bus->priv = dwpriv;
- /* Copy the bus accessors, name and private data */
+ /* Copy the bus accessors and private data */
bb_miiphy->mdio_active = dw_eth_bb_mdio_active;
bb_miiphy->mdio_tristate = dw_eth_bb_mdio_tristate;
bb_miiphy->set_mdio = dw_eth_bb_set_mdio;
bb_miiphy->get_mdio = dw_eth_bb_get_mdio;
bb_miiphy->set_mdc = dw_eth_bb_set_mdc;
bb_miiphy->delay = dw_eth_bb_delay;
- strlcpy(bb_miiphy->name, bus->name, MDIO_NAME_LEN);
return mdio_register(bus);
}