]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
net: phy: remove phy_stop_interrupts
authorHeiner Kallweit <hkallweit1@gmail.com>
Thu, 17 Jan 2019 19:09:21 +0000 (20:09 +0100)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Jan 2019 22:12:25 +0000 (14:12 -0800)
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>
drivers/net/phy/phy.c
drivers/net/phy/phy_device.c
include/linux/phy.h

index 37cf39fdcc91fe9bccea200a80754aa0c44b3e57..f7a92e7edff7e513d83d5565729a719fb30729a8 100644 (file)
@@ -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
index e269a355012db336e5030357f2f9c5471071f204..7b31641742519a83c593f7483e026d33c92aca4b 100644 (file)
@@ -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;
 
index 232d93b9cea473575be3a56a189a74995b637f5d..0990f913d64901362121e6319c4d1a60406cebd9 100644 (file)
@@ -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);