|
@@ -135,9 +135,7 @@ static int mdio_bus_phy_resume(struct device *dev)
|
|
|
if (!mdio_bus_phy_may_suspend(phydev))
|
|
|
goto no_resume;
|
|
|
|
|
|
- mutex_lock(&phydev->lock);
|
|
|
ret = phy_resume(phydev);
|
|
|
- mutex_unlock(&phydev->lock);
|
|
|
if (ret < 0)
|
|
|
return ret;
|
|
|
|
|
@@ -1041,9 +1039,7 @@ int phy_attach_direct(struct net_device *dev, struct phy_device *phydev,
|
|
|
if (err)
|
|
|
goto error;
|
|
|
|
|
|
- mutex_lock(&phydev->lock);
|
|
|
phy_resume(phydev);
|
|
|
- mutex_unlock(&phydev->lock);
|
|
|
phy_led_triggers_register(phydev);
|
|
|
|
|
|
return err;
|
|
@@ -1172,7 +1168,7 @@ int phy_suspend(struct phy_device *phydev)
|
|
|
}
|
|
|
EXPORT_SYMBOL(phy_suspend);
|
|
|
|
|
|
-int phy_resume(struct phy_device *phydev)
|
|
|
+int __phy_resume(struct phy_device *phydev)
|
|
|
{
|
|
|
struct phy_driver *phydrv = to_phy_driver(phydev->mdio.dev.driver);
|
|
|
int ret = 0;
|
|
@@ -1189,6 +1185,18 @@ int phy_resume(struct phy_device *phydev)
|
|
|
|
|
|
return ret;
|
|
|
}
|
|
|
+EXPORT_SYMBOL(__phy_resume);
|
|
|
+
|
|
|
+int phy_resume(struct phy_device *phydev)
|
|
|
+{
|
|
|
+ int ret;
|
|
|
+
|
|
|
+ mutex_lock(&phydev->lock);
|
|
|
+ ret = __phy_resume(phydev);
|
|
|
+ mutex_unlock(&phydev->lock);
|
|
|
+
|
|
|
+ return ret;
|
|
|
+}
|
|
|
EXPORT_SYMBOL(phy_resume);
|
|
|
|
|
|
int phy_loopback(struct phy_device *phydev, bool enable)
|