summaryrefslogtreecommitdiff
path: root/drivers/net/phy/mdio_bus.c
diff options
context:
space:
mode:
authorKumar Gala <galak@gate.crashing.org>2006-01-11 19:27:33 (GMT)
committerJeff Garzik <jgarzik@pobox.com>2006-01-12 21:31:52 (GMT)
commita4d00f179fcec7065fe5742e9cebd6500886070f (patch)
tree1d0fea6521276122c2e767db52bc821241849f8e /drivers/net/phy/mdio_bus.c
parent1d5326774c9245fef77334a9e0f11cd4f8aa7b4e (diff)
downloadlinux-a4d00f179fcec7065fe5742e9cebd6500886070f.tar.xz
[PATCH] phy: Added a macro to represent the string format used to match a phy device
Add the PHY_ID_FMT macro to ensure that the format of the id string used by a driver to match to its specific phy is consistent between the mdio_bus and the driver. Signed-off-by: Kumar Gala <galak@kernel.crashing.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Jeff Garzik <jgarzik@pobox.com>
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r--drivers/net/phy/mdio_bus.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02940c0..459443b 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -81,7 +81,7 @@ int mdiobus_register(struct mii_bus *bus)
phydev->dev.parent = bus->dev;
phydev->dev.bus = &mdio_bus_type;
- sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i);
+ snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i);
phydev->bus = bus;