diff options
author | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-09 11:52:31 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2007-04-27 10:57:31 -0700 |
commit | 87aebe078e450795d336d20304d01095251ff9fa (patch) | |
tree | be325bd51bb7f9fdd75b0970b71dc6826b93a131 /drivers/net/phy/phy_device.c | |
parent | a2a0f74dc1e7d588b0ba6a1d177f42bef18117d0 (diff) |
PHY: remove rwsem use from phy core
The subsystem rwsem is not used by the driver core at all, so the use of
it in the phy code doesn't make any sense. They might possibly
want to use a local lock, but I am unsure about that.
Cc: netdev <netdev@vger.kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/phy/phy_device.c')
-rw-r--r-- | drivers/net/phy/phy_device.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 7d5b6d1838c8..8f01952c4850 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -208,16 +208,12 @@ struct phy_device *phy_attach(struct net_device *dev, * exist, and we should use the genphy driver. */ if (NULL == d->driver) { int err; - down_write(&d->bus->subsys.rwsem); d->driver = &genphy_driver.driver; err = d->driver->probe(d); - if (err >= 0) err = device_bind_driver(d); - up_write(&d->bus->subsys.rwsem); - if (err) return ERR_PTR(err); } @@ -258,11 +254,8 @@ void phy_detach(struct phy_device *phydev) * was using the generic driver), we unbind the device * from the generic driver so that there's a chance a * real driver could be loaded */ - if (phydev->dev.driver == &genphy_driver.driver) { - down_write(&phydev->dev.bus->subsys.rwsem); + if (phydev->dev.driver == &genphy_driver.driver) device_release_driver(&phydev->dev); - up_write(&phydev->dev.bus->subsys.rwsem); - } } EXPORT_SYMBOL(phy_detach); |