Commit bb658ab7 authored by Heiner Kallweit's avatar Heiner Kallweit Committed by David S. Miller

net: phy: remove phy_stop_interrupts

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: default avatarHeiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent cbfd12b3
...@@ -818,23 +818,6 @@ int phy_start_interrupts(struct phy_device *phydev) ...@@ -818,23 +818,6 @@ int phy_start_interrupts(struct phy_device *phydev)
} }
EXPORT_SYMBOL(phy_start_interrupts); 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 * phy_stop - Bring down the PHY link, and stop checking the status
* @phydev: target phy_device struct * @phydev: target phy_device struct
......
...@@ -1002,8 +1002,8 @@ void phy_disconnect(struct phy_device *phydev) ...@@ -1002,8 +1002,8 @@ void phy_disconnect(struct phy_device *phydev)
if (phy_is_started(phydev)) if (phy_is_started(phydev))
phy_stop(phydev); phy_stop(phydev);
if (phydev->irq > 0) if (phy_interrupt_is_valid(phydev))
phy_stop_interrupts(phydev); free_irq(phydev->irq, phydev);
phydev->adjust_link = NULL; phydev->adjust_link = NULL;
......
...@@ -951,7 +951,6 @@ int phy_aneg_done(struct phy_device *phydev); ...@@ -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_down(struct phy_device *phydev, bool sync);
int phy_speed_up(struct phy_device *phydev); 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_restart_aneg(struct phy_device *phydev);
int phy_reset_after_clk_enable(struct phy_device *phydev); int phy_reset_after_clk_enable(struct phy_device *phydev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment