diff options
author | Alan Stern <stern@rowland.harvard.edu> | 2012-01-24 13:35:24 -0500 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@suse.de> | 2012-01-24 19:00:35 -0500 |
commit | f3ff9247088a0af0c192a28908dab76ff3d8871f (patch) | |
tree | 4ff2c822bcf82213d14b2195d4f00fe470876b1d /drivers/net/phy | |
parent | 9f30ea950edfaefa51221dd26a065b3442599778 (diff) |
Remove useless get_driver()/put_driver() calls
As part of the removal of get_driver()/put_driver(), this patch
(as1512) gets rid of various useless and unnecessary calls in several
drivers. In some cases it may be desirable to pin the driver by
calling try_module_get(), but that can be done later.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu>
CC: "David S. Miller" <davem@davemloft.net>
CC: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
CC: Michael Buesch <m@bues.ch>
CC: Joerg Roedel <joerg.roedel@amd.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phy_device.c | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index f320f466f03b..e8c42d6a7d1c 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c | |||
@@ -915,9 +915,7 @@ static int phy_probe(struct device *dev) | |||
915 | 915 | ||
916 | phydev = to_phy_device(dev); | 916 | phydev = to_phy_device(dev); |
917 | 917 | ||
918 | /* Make sure the driver is held. | 918 | drv = phydev->dev.driver; |
919 | * XXX -- Is this correct? */ | ||
920 | drv = get_driver(phydev->dev.driver); | ||
921 | phydrv = to_phy_driver(drv); | 919 | phydrv = to_phy_driver(drv); |
922 | phydev->drv = phydrv; | 920 | phydev->drv = phydrv; |
923 | 921 | ||
@@ -957,8 +955,6 @@ static int phy_remove(struct device *dev) | |||
957 | 955 | ||
958 | if (phydev->drv->remove) | 956 | if (phydev->drv->remove) |
959 | phydev->drv->remove(phydev); | 957 | phydev->drv->remove(phydev); |
960 | |||
961 | put_driver(dev->driver); | ||
962 | phydev->drv = NULL; | 958 | phydev->drv = NULL; |
963 | 959 | ||
964 | return 0; | 960 | return 0; |