diff options
author | Andy Fleming <afleming@freescale.com> | 2008-04-09 19:38:13 -0500 |
---|---|---|
committer | Jeff Garzik <jgarzik@redhat.com> | 2008-04-16 20:09:35 -0400 |
commit | 9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0 (patch) | |
tree | 51b2ee6bfa87bbd6faac0bc00a787354e1fb72a0 /drivers/net/fs_enet/mii-fec.c | |
parent | d080cd6301e107e79c6a0fc654319f8979f70549 (diff) | |
download | op-kernel-dev-9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0.zip op-kernel-dev-9d9326d3bc0ea9a8bbe40bf3e5e66c7b9858caa0.tar.gz |
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-fec.c')
-rw-r--r-- | drivers/net/fs_enet/mii-fec.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/fs_enet/mii-fec.c b/drivers/net/fs_enet/mii-fec.c index a89cf15..ba75efc 100644 --- a/drivers/net/fs_enet/mii-fec.c +++ b/drivers/net/fs_enet/mii-fec.c @@ -196,7 +196,7 @@ static int __devinit fs_enet_mdio_probe(struct of_device *ofdev, if (ret) return ret; - new_bus->id = res.start; + snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", res.start); fec->fecp = ioremap(res.start, res.end - res.start + 1); if (!fec->fecp) @@ -309,7 +309,7 @@ static int __devinit fs_enet_fec_mdio_probe(struct device *dev) new_bus->read = &fs_enet_fec_mii_read, new_bus->write = &fs_enet_fec_mii_write, new_bus->reset = &fs_enet_fec_mii_reset, - new_bus->id = pdev->id; + snprintf(new_bus->id, MII_BUS_ID_SIZE, "%x", pdev->id); pdata = (struct fs_mii_fec_platform_info *)pdev->dev.platform_data; |