Skip to content

Commit

Permalink
net: phy: remove phy_stop_interrupts
Browse files Browse the repository at this point in the history
Interrupts have been disabled in phy_stop() already. So we can remove
phy_stop_interrupts() and free the interrupt in phy_disconnect()
directly.

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 Jan 18, 2019
1 parent cbfd12b commit bb658ab
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 20 deletions.
17 changes: 0 additions & 17 deletions drivers/net/phy/phy.c
Original file line number Diff line number Diff line change
Expand Up @@ -818,23 +818,6 @@ int phy_start_interrupts(struct phy_device *phydev)
}
EXPORT_SYMBOL(phy_start_interrupts);

/**
* phy_stop_interrupts - disable interrupts from a PHY device
* @phydev: target phy_device struct
*/
int phy_stop_interrupts(struct phy_device *phydev)
{
int err = phy_disable_interrupts(phydev);

if (err)
phy_error(phydev);

free_irq(phydev->irq, phydev);

return err;
}
EXPORT_SYMBOL(phy_stop_interrupts);

/**
* phy_stop - Bring down the PHY link, and stop checking the status
* @phydev: target phy_device struct
Expand Down
4 changes: 2 additions & 2 deletions drivers/net/phy/phy_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -1002,8 +1002,8 @@ void phy_disconnect(struct phy_device *phydev)
if (phy_is_started(phydev))
phy_stop(phydev);

if (phydev->irq > 0)
phy_stop_interrupts(phydev);
if (phy_interrupt_is_valid(phydev))
free_irq(phydev->irq, phydev);

phydev->adjust_link = NULL;

Expand Down
1 change: 0 additions & 1 deletion include/linux/phy.h
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,6 @@ int phy_aneg_done(struct phy_device *phydev);
int phy_speed_down(struct phy_device *phydev, bool sync);
int phy_speed_up(struct phy_device *phydev);

int phy_stop_interrupts(struct phy_device *phydev);
int phy_restart_aneg(struct phy_device *phydev);
int phy_reset_after_clk_enable(struct phy_device *phydev);

Expand Down

0 comments on commit bb658ab

Please sign in to comment.