Skip to content

Commit

Permalink
net: phy: use phy_disable_interrupts in phy_stop
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Heiner Kallweit authored and David S. Miller committed Mar 7, 2018
1 parent 4fff2d3 commit 70a55c3
Showing 1 changed file with 2 additions and 7 deletions.
9 changes: 2 additions & 7 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 70a55c3

Please sign in to comment.