diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2008-01-27 13:29:20 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2008-10-16 12:24:52 -0400 |
commit | 26853ab6f9a4c482be4b638477335704724d4854 (patch) | |
tree | b535042f8739c083ad56b1bb749001c24ab1b8ce /drivers/net/phy | |
parent | 0b4a4fea253e1296222603ccc55430ed7cd9413a (diff) |
NET: convert the phy_device file to use bus_find_device_by_name
The driver core now has this helper function, so might as well use it
instead of forcing the phy code to roll their own version.
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy_device.c | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f11e900b437b..e11b03b2b25a 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -309,11 +309,6 @@ void phy_disconnect(struct phy_device *phydev) | |||
309 | } | 309 | } |
310 | EXPORT_SYMBOL(phy_disconnect); | 310 | EXPORT_SYMBOL(phy_disconnect); |
311 | 311 | ||
312 | static int phy_compare_id(struct device *dev, void *data) | ||
313 | { | ||
314 | return strcmp((char *)data, dev->bus_id) ? 0 : 1; | ||
315 | } | ||
316 | |||
317 | /** | 312 | /** |
318 | * phy_attach - attach a network device to a particular PHY device | 313 | * phy_attach - attach a network device to a particular PHY device |
319 | * @dev: network device to attach | 314 | * @dev: network device to attach |
@@ -337,8 +332,7 @@ struct phy_device *phy_attach(struct net_device *dev, | |||
337 | 332 | ||
338 | /* Search the list of PHY devices on the mdio bus for the | 333 | /* Search the list of PHY devices on the mdio bus for the |
339 | * PHY with the requested name */ | 334 | * PHY with the requested name */ |
340 | d = bus_find_device(bus, NULL, (void *)bus_id, phy_compare_id); | 335 | d = bus_find_device_by_name(bus, NULL, bus_id); |
341 | |||
342 | if (d) { | 336 | if (d) { |
343 | phydev = to_phy_device(d); | 337 | phydev = to_phy_device(d); |
344 | } else { | 338 | } else { |