From mboxrd@z Thu Jan 1 00:00:00 1970 From: Heiner Kallweit Subject: [PATCH net-next] net: phy: check for implementation of both callbacks in phy_drv_supports_irq Date: Mon, 12 Nov 2018 21:16:06 +0100 Message-ID: Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Cc: "netdev@vger.kernel.org" To: Andrew Lunn , Florian Fainelli , David Miller Return-path: Received: from mail-wr1-f66.google.com ([209.85.221.66]:37451 "EHLO mail-wr1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725861AbeKMGLD (ORCPT ); Tue, 13 Nov 2018 01:11:03 -0500 Received: by mail-wr1-f66.google.com with SMTP id o15-v6so10769414wrv.4 for ; Mon, 12 Nov 2018 12:16:15 -0800 (PST) Content-Language: en-US Sender: netdev-owner@vger.kernel.org List-ID: 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 --- drivers/net/phy/phy_device.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phy_device.c b/drivers/net/phy/phy_device.c index 55202a0ac..e06613f2d 100644 --- a/drivers/net/phy/phy_device.c +++ b/drivers/net/phy/phy_device.c @@ -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; } /** -- 2.19.1