aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/fs_enet/mii-bitbang.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/fs_enet/mii-bitbang.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/fs_enet/mii-bitbang.c')
-rw-r--r--drivers/net/fs_enet/mii-bitbang.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fs_enet/mii-bitbang.c b/drivers/net/fs_enet/mii-bitbang.c
index b8e4a736a130..1620030cd33c 100644
--- a/drivers/net/fs_enet/mii-bitbang.c
+++ b/drivers/net/fs_enet/mii-bitbang.c
@@ -130,7 +130,7 @@ static int __devinit fs_mii_bitbang_init(struct mii_bus *bus,
130 * we get is an int, and the odds of multiple bitbang mdio buses 130 * we get is an int, and the odds of multiple bitbang mdio buses
131 * is low enough that it's not worth going too crazy. 131 * is low enough that it's not worth going too crazy.
132 */ 132 */
133 bus->id = res.start; 133 snprintf(bus->id, MII_BUS_ID_SIZE, "%x", res.start);
134 134
135 data = of_get_property(np, "fsl,mdio-pin", &len); 135 data = of_get_property(np, "fsl,mdio-pin", &len);
136 if (!data || len != 4) 136 if (!data || len != 4)
@@ -307,7 +307,7 @@ static int __devinit fs_enet_mdio_probe(struct device *dev)
307 return -ENOMEM; 307 return -ENOMEM;
308 308
309 new_bus->name = "BB MII Bus", 309 new_bus->name = "BB MII Bus",
310 new_bus->id = pdev->id; 310 snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id);
311 311
312 new_bus->phy_mask = ~0x9; 312 new_bus->phy_mask = ~0x9;
313 pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data; 313 pdata = (struct fs_mii_bb_platform_info *)pdev->dev.platform_data;