diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2019-01-17 22:09:21 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2019-01-19 01:12:25 +0300 |
commit | bb658ab7b8f2828b35c207a95cb0c05965721022 (patch) | |
tree | 36132c101bee7156226713c6038de55babc073ea | |
parent | cbfd12b3e8c3542e8142aa041714ed614d3f67b0 (diff) | |
download | linux-bb658ab7b8f2828b35c207a95cb0c05965721022.tar.xz |
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: Heiner Kallweit <hkallweit1@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r-- | drivers/net/phy/phy.c | 17 | ||||
-rw-r--r-- | drivers/net/phy/phy_device.c | 4 | ||||
-rw-r--r-- | include/linux/phy.h | 1 |
3 files changed, 2 insertions, 20 deletions
diff --git a/drivers/net/phy/phy.c b/drivers/net/phy/phy.c index 37cf39fdcc91..f7a92e7edff7 100644 --- a/drivers/net/phy/phy.c +++ b/drivers/net/phy/phy.c @@ -819,23 +819,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 */ diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index e269a355012d..7b3164174251 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -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; diff --git a/include/linux/phy.h b/include/linux/phy.h index 232d93b9cea4..0990f913d649 100644 --- a/include/linux/phy.h +++ b/include/linux/phy.h @@ -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); |