diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2008-11-10 16:55:14 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2008-11-10 16:55:14 -0500 |
commit | fb28ad35906af2f042c94e2f9c0f898ef9acfa37 (patch) | |
tree | ee3d535ab38d680b424a857406789f8c28bf5266 /drivers/net/phy | |
parent | 23779897546c1effb546ff89b89803d9d955d517 (diff) |
net: struct device - replace bus_id with dev_name(), dev_set_name()
Acked-by: Marcel Holtmann <marcel@holtmann.org>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
Signed-off-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 4 | ||||
-rw-r--r-- | drivers/net/phy/phy.c | 2 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index d0ed1ef284a8..6afd35f62d77 100644 --- a/drivers/net/phy/mdio_bus.c +++ b/drivers/net/phy/mdio_bus.c | |||
@@ -97,7 +97,7 @@ int mdiobus_register(struct mii_bus *bus) | |||
97 | bus->dev.parent = bus->parent; | 97 | bus->dev.parent = bus->parent; |
98 | bus->dev.class = &mdio_bus_class; | 98 | bus->dev.class = &mdio_bus_class; |
99 | bus->dev.groups = NULL; | 99 | bus->dev.groups = NULL; |
100 | memcpy(bus->dev.bus_id, bus->id, MII_BUS_ID_SIZE); | 100 | dev_set_name(&bus->dev, bus->id); |
101 | 101 | ||
102 | err = device_register(&bus->dev); | 102 | err = device_register(&bus->dev); |
103 | if (err) { | 103 | if (err) { |
@@ -191,7 +191,7 @@ struct phy_device *mdiobus_scan(struct mii_bus *bus, int addr) | |||
191 | 191 | ||
192 | phydev->dev.parent = bus->parent; | 192 | phydev->dev.parent = bus->parent; |
193 | phydev->dev.bus = &mdio_bus_type; | 193 | phydev->dev.bus = &mdio_bus_type; |
194 | snprintf(phydev->dev.bus_id, BUS_ID_SIZE, PHY_ID_FMT, bus->id, addr); | 194 | dev_set_name(&phydev->dev, PHY_ID_FMT, bus->id, addr); |
195 | 195 | ||
196 | phydev->bus = bus; | 196 | phydev->bus = bus; |
197 | 197 | ||
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index df4e6257d4a7..e4ede6080c9d 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c | |||
@@ -45,7 +45,7 @@ | |||
45 | */ | 45 | */ |
46 | void phy_print_status(struct phy_device *phydev) | 46 | void phy_print_status(struct phy_device *phydev) |
47 | { | 47 | { |
48 | pr_info("PHY: %s - Link is %s", phydev->dev.bus_id, | 48 | pr_info("PHY: %s - Link is %s", dev_name(&phydev->dev), |
49 | phydev->link ? "Up" : "Down"); | 49 | phydev->link ? "Up" : "Down"); |
50 | if (phydev->link) | 50 | if (phydev->link) |
51 | printk(" - %d/%s", phydev->speed, | 51 | printk(" - %d/%s", phydev->speed, |
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e11b03b2b25a..e976c1c60095 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -74,7 +74,7 @@ int phy_register_fixup(const char *bus_id, u32 phy_uid, u32 phy_uid_mask, | |||
74 | if (!fixup) | 74 | if (!fixup) |
75 | return -ENOMEM; | 75 | return -ENOMEM; |
76 | 76 | ||
77 | strncpy(fixup->bus_id, bus_id, BUS_ID_SIZE); | 77 | strlcpy(fixup->bus_id, bus_id, sizeof(fixup->bus_id)); |
78 | fixup->phy_uid = phy_uid; | 78 | fixup->phy_uid = phy_uid; |
79 | fixup->phy_uid_mask = phy_uid_mask; | 79 | fixup->phy_uid_mask = phy_uid_mask; |
80 | fixup->run = run; | 80 | fixup->run = run; |
@@ -109,7 +109,7 @@ EXPORT_SYMBOL(phy_register_fixup_for_id); | |||
109 | */ | 109 | */ |
110 | static int phy_needs_fixup(struct phy_device *phydev, struct phy_fixup *fixup) | 110 | static int phy_needs_fixup(struct phy_device *phydev, struct phy_fixup *fixup) |
111 | { | 111 | { |
112 | if (strcmp(fixup->bus_id, phydev->dev.bus_id) != 0) | 112 | if (strcmp(fixup->bus_id, dev_name(&phydev->dev)) != 0) |
113 | if (strcmp(fixup->bus_id, PHY_ANY_ID) != 0) | 113 | if (strcmp(fixup->bus_id, PHY_ANY_ID) != 0) |
114 | return 0; | 114 | return 0; |
115 | 115 | ||