summaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2009-01-26 17:43:16 -0800
committerDavid S. Miller <davem@davemloft.net>2009-01-26 17:43:16 -0800
commit3eacdf58c2c0b9507afedfc19108e98b992c31e4 (patch)
treed95e7e022ff6e6181edce43fe97cf2883b5a91ed /drivers/net/phy
parentdd0a251c8e087bca05e8f9a3657078591ae6e12b (diff)
parent5376071069ec8a7e6a8112beab16fc24f5139475 (diff)
downloadop-kernel-dev-3eacdf58c2c0b9507afedfc19108e98b992c31e4.zip
op-kernel-dev-3eacdf58c2c0b9507afedfc19108e98b992c31e4.tar.gz
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/mdio_bus.c8
-rw-r--r--drivers/net/phy/smsc.c12
2 files changed, 15 insertions, 5 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c
index 11adf6e..811a63769 100644
--- a/drivers/net/phy/mdio_bus.c
+++ b/drivers/net/phy/mdio_bus.c
@@ -296,9 +296,8 @@ static int mdio_bus_suspend(struct device * dev, pm_message_t state)
struct phy_driver *phydrv = to_phy_driver(drv);
struct phy_device *phydev = to_phy_device(dev);
- if ((!device_may_wakeup(phydev->dev.parent)) &&
- (phydrv && phydrv->suspend))
- ret = phydrv->suspend(phydev);
+ if (drv && phydrv->suspend && !device_may_wakeup(phydev->dev.parent))
+ ret = phydrv->suspend(phydev);
return ret;
}
@@ -310,8 +309,7 @@ static int mdio_bus_resume(struct device * dev)
struct phy_driver *phydrv = to_phy_driver(drv);
struct phy_device *phydev = to_phy_device(dev);
- if ((!device_may_wakeup(phydev->dev.parent)) &&
- (phydrv && phydrv->resume))
+ if (drv && phydrv->resume && !device_may_wakeup(phydev->dev.parent))
ret = phydrv->resume(phydev);
return ret;
diff --git a/drivers/net/phy/smsc.c b/drivers/net/phy/smsc.c
index c05d38d..1387187 100644
--- a/drivers/net/phy/smsc.c
+++ b/drivers/net/phy/smsc.c
@@ -81,6 +81,9 @@ static struct phy_driver lan83c185_driver = {
.ack_interrupt = smsc_phy_ack_interrupt,
.config_intr = smsc_phy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+
.driver = { .owner = THIS_MODULE, }
};
@@ -102,6 +105,9 @@ static struct phy_driver lan8187_driver = {
.ack_interrupt = smsc_phy_ack_interrupt,
.config_intr = smsc_phy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+
.driver = { .owner = THIS_MODULE, }
};
@@ -123,6 +129,9 @@ static struct phy_driver lan8700_driver = {
.ack_interrupt = smsc_phy_ack_interrupt,
.config_intr = smsc_phy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+
.driver = { .owner = THIS_MODULE, }
};
@@ -144,6 +153,9 @@ static struct phy_driver lan911x_int_driver = {
.ack_interrupt = smsc_phy_ack_interrupt,
.config_intr = smsc_phy_config_intr,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+
.driver = { .owner = THIS_MODULE, }
};
OpenPOWER on IntegriCloud