summaryrefslogtreecommitdiff
path: root/drivers/net
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@suse.de>2008-01-27 10:29:20 -0800
committerStephen Rothwell <sfr@canb.auug.org.au>2008-04-24 12:39:11 +1000
commitb18e9557d0b8bcd163b55f00b91d9c0bc9507401 (patch)
tree5576acaeb3a2bd767e11e449b55dd840bac8a336 /drivers/net
parent807501475fce0ebe68baedf87f202c3e4ee0d12c (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')
-rw-r--r--drivers/net/phy/phy_device.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c
index 8b1121b02f98..88b0d933182e 100644
--- a/drivers/net/phy/phy_device.c
+++ b/drivers/net/phy/phy_device.c
@@ -218,11 +218,6 @@ void phy_disconnect(struct phy_device *phydev)
}
EXPORT_SYMBOL(phy_disconnect);
-static int phy_compare_id(struct device *dev, void *data)
-{
- return strcmp((char *)data, dev->bus_id) ? 0 : 1;
-}
-
/**
* phy_attach - attach a network device to a particular PHY device
* @dev: network device to attach
@@ -246,8 +241,7 @@ struct phy_device *phy_attach(struct net_device *dev,
/* Search the list of PHY devices on the mdio bus for the
* PHY with the requested name */
- d = bus_find_device(bus, NULL, (void *)phy_id, phy_compare_id);
-
+ d = bus_find_device_by_name(bus, NULL, phy_id);
if (d) {
phydev = to_phy_device(d);
} else {