aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorKumar Gala <galak@gate.crashing.org>2006-01-11 14:27:33 -0500
committerJeff Garzik <jgarzik@pobox.com>2006-01-12 16:31:52 -0500
commita4d00f179fcec7065fe5742e9cebd6500886070f (patch)
tree1d0fea6521276122c2e767db52bc821241849f8e /drivers/net/phy
parent1d5326774c9245fef77334a9e0f11cd4f8aa7b4e (diff)
[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')
-rw-r--r--drivers/net/phy/mdio_bus.c2
-rw-r--r--drivers/net/phy/phy.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 02940c0fef68..459443b572ce 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)
81 81
82 phydev->dev.parent = bus->dev; 82 phydev->dev.parent = bus->dev;
83 phydev->dev.bus = &mdio_bus_type; 83 phydev->dev.bus = &mdio_bus_type;
84 sprintf(phydev->dev.bus_id, "phy%d:%d", bus->id, i); 84 snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, i);
85 85
86 phydev->bus = bus; 86 phydev->bus = bus;
87 87
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c
index b8686e47f899..1474b7c5ac0b 100644
--- a/drivers/net/phy/phy.c
+++ b/drivers/net/phy/phy.c
@@ -42,7 +42,7 @@
42 */ 42 */
43void phy_print_status(struct phy_device *phydev) 43void phy_print_status(struct phy_device *phydev)
44{ 44{
45 pr_info("%s: Link is %s", phydev->dev.bus_id, 45 pr_info("PHY: %s - Link is %s", phydev->dev.bus_id,
46 phydev->link ? "Up" : "Down"); 46 phydev->link ? "Up" : "Down");
47 if (phydev->link) 47 if (phydev->link)
48 printk(" - %d/%s", phydev->speed, 48 printk(" - %d/%s", phydev->speed,