From 9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0 Mon Sep 17 00:00:00 2001 From: Andy Fleming Date: Wed, 9 Apr 2008 19:38:13 -0500 Subject: phy: Change mii_bus id field to a string Having the id field be an int was making more complex bus topologies excessively difficult. For now, just convert it to a string, and change all instances of "bus->id = val" to snprintf(id, MII_BUS_ID_LEN, "%x", val). Signed-off-by: Andy Fleming Signed-off-by: Jeff Garzik --- drivers/net/cpmac.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'drivers/net/cpmac.c') diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c index c85194f2cd2..9da7ff43703 100644 --- a/drivers/net/cpmac.c +++ b/drivers/net/cpmac.c @@ -987,7 +987,7 @@ static int external_switch; static int __devinit cpmac_probe(struct platform_device *pdev) { int rc, phy_id, i; - int mdio_bus_id = cpmac_mii.id; + char *mdio_bus_id = "0"; struct resource *mem; struct cpmac_priv *priv; struct net_device *dev; @@ -1008,8 +1008,6 @@ static int __devinit cpmac_probe(struct platform_device *pdev) if (external_switch || dumb_switch) { struct fixed_phy_status status = {}; - mdio_bus_id = 0; - /* * FIXME: this should be in the platform code! * Since there is not platform code at all (that is, @@ -1143,6 +1141,7 @@ int __devinit cpmac_init(void) } cpmac_mii.phy_mask = ~(mask | 0x80000000); + snprintf(cpmac_mii.id, MII_BUS_ID_SIZE, "0"); res = mdiobus_register(&cpmac_mii); if (res) -- cgit v1.2.3