net: phy: check for implementation of both callbacks in phy_drv_supports_irq
authorHeiner Kallweit <hkallweit1@gmail.com>
Mon, 12 Nov 2018 20:16:06 +0000 (21:16 +0100)
committerDavid S. Miller <davem@davemloft.net>
Sat, 17 Nov 2018 03:31:06 +0000 (19:31 -0800)
Now that the icplus driver has been fixed all PHY drivers supporting
interrupts have both callbacks (config_intr and ack_interrupt)
implemented - as it should be. Therefore phy_drv_supports_irq()
can be changed now to check for both callbacks being implemented.

Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Acked-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/phy/phy_device.c

index 55202a0ac4767a91e5b8e73a9fff45154bde3be1..e06613f2d431aa828a7bc10d765aacaf25f248f1 100644 (file)
@@ -2122,7 +2122,7 @@ static void of_set_phy_eee_broken(struct phy_device *phydev)
 
 static bool phy_drv_supports_irq(struct phy_driver *phydrv)
 {
-       return phydrv->config_intr || phydrv->ack_interrupt;
+       return phydrv->config_intr && phydrv->ack_interrupt;
 }
 
 /**