diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-04 14:54:56 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-04 14:54:56 +0100 |
commit | bb960a1e42042e82447a5bc0941b3ab6d614bac3 (patch) | |
tree | d2295a923fabb1b01b25bb015c4c2e42ee9df5ca /drivers/net/phy/mdio_bus.c | |
parent | 858770619debfb9269add63e4ba8b7c6b5538dd1 (diff) | |
parent | 06fc732c33a7ff5e4c91bcf4a6ca86b5e335ad9a (diff) |
Merge branch 'core/xen' into x86/urgent
Diffstat (limited to 'drivers/net/phy/mdio_bus.c')
-rw-r--r-- | drivers/net/phy/mdio_bus.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 11adf6ed462..811a637695c 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; |