aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/cpmac.c
diff options
context:
space:
mode:
authorAndy Fleming <afleming@freescale.com>2008-04-09 20:38:13 -0400
committerJeff Garzik <jgarzik@redhat.com>2008-04-16 20:09:35 -0400
commit9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0 (patch)
tree51b2ee6bfa87bbd6faac0bc00a787354e1fb72a0 /drivers/net/cpmac.c
parentd080cd6301e107e79c6a0fc654319f8979f70549 (diff)
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 <afleming@freescale.com> Signed-off-by: Jeff Garzik <jgarzik@redhat.com>
Diffstat (limited to 'drivers/net/cpmac.c')
-rw-r--r--drivers/net/cpmac.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/net/cpmac.c b/drivers/net/cpmac.c
index c85194f2cd2d..9da7ff437031 100644
--- a/drivers/net/cpmac.c
+++ b/drivers/net/cpmac.c
@@ -987,7 +987,7 @@ static int external_switch;
987static int __devinit cpmac_probe(struct platform_device *pdev) 987static int __devinit cpmac_probe(struct platform_device *pdev)
988{ 988{
989 int rc, phy_id, i; 989 int rc, phy_id, i;
990 int mdio_bus_id = cpmac_mii.id; 990 char *mdio_bus_id = "0";
991 struct resource *mem; 991 struct resource *mem;
992 struct cpmac_priv *priv; 992 struct cpmac_priv *priv;
993 struct net_device *dev; 993 struct net_device *dev;
@@ -1008,8 +1008,6 @@ static int __devinit cpmac_probe(struct platform_device *pdev)
1008 if (external_switch || dumb_switch) { 1008 if (external_switch || dumb_switch) {
1009 struct fixed_phy_status status = {}; 1009 struct fixed_phy_status status = {};
1010 1010
1011 mdio_bus_id = 0;
1012
1013 /* 1011 /*
1014 * FIXME: this should be in the platform code! 1012 * FIXME: this should be in the platform code!
1015 * Since there is not platform code at all (that is, 1013 * Since there is not platform code at all (that is,
@@ -1143,6 +1141,7 @@ int __devinit cpmac_init(void)
1143 } 1141 }
1144 1142
1145 cpmac_mii.phy_mask = ~(mask | 0x80000000); 1143 cpmac_mii.phy_mask = ~(mask | 0x80000000);
1144 snprintf(cpmac_mii.id, MII_BUS_ID_SIZE, "0");
1146 1145
1147 res = mdiobus_register(&cpmac_mii); 1146 res = mdiobus_register(&cpmac_mii);
1148 if (res) 1147 if (res)