diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2018-03-06 00:34:46 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-03-07 20:30:20 +0300 |
commit | 70a55c32ee6f3781d294d64c75380c94f4b99ae8 (patch) | |
tree | ac36f30727a5796381ecb8506bdf9adfb3540ece /drivers/net/phy/phy.c | |
parent | 4fff2d33c707938c537b7aeb2c511226f8a20313 (diff) | |
download | linux-70a55c32ee6f3781d294d64c75380c94f4b99ae8.tar.xz |
net: phy: use phy_disable_interrupts in phy_stop
Now that phy_disable_interrupts() can't take lock phydev->lock any longer,
we can use it to simplify phy_stop().
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy/phy.c')
-rw-r--r-- | drivers/net/phy/phy.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index c5aa773eacdc..c2d9027be863 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -765,13 +765,8 @@ void phy_stop(struct phy_device *phydev) if (PHY_HALTED == phydev->state) goto out_unlock; - if (phy_interrupt_is_valid(phydev)) { - /* Disable PHY Interrupts */ - phy_config_interrupt(phydev, PHY_INTERRUPT_DISABLED); - - /* Clear any pending interrupts */ - phy_clear_interrupt(phydev); - } + if (phy_interrupt_is_valid(phydev)) + phy_disable_interrupts(phydev); phydev->state = PHY_HALTED; |