forked from Minki/linux
net: phy: stop PHY if needed when entering phy_disconnect
Stop PHY if needed when entering phy_disconnect. This allows drivers that don't need a separate call to phy_stop() to omit this call. Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
340a6f3d2d
commit
472115d983
@ -999,6 +999,9 @@ EXPORT_SYMBOL(phy_connect);
|
||||
*/
|
||||
void phy_disconnect(struct phy_device *phydev)
|
||||
{
|
||||
if (phy_is_started(phydev))
|
||||
phy_stop(phydev);
|
||||
|
||||
if (phydev->irq > 0)
|
||||
phy_stop_interrupts(phydev);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user