From mboxrd@z Thu Jan 1 00:00:00 1970 From: Florian Fainelli Subject: [PATCH net-next 1/9] net: phy: phylink: Use gpiod_get_value_cansleep() Date: Sat, 5 May 2018 12:04:17 -0700 Message-ID: <20180505190425.14378-2-f.fainelli@gmail.com> References: <20180505190425.14378-1-f.fainelli@gmail.com> Cc: Florian Fainelli , privat@egil-hjelmeland.no, andrew@lunn.ch, vivien.didelot@savoirfairelinux.com, davem@davemloft.net, rmk+kernel@armlinux.org.uk, sean.wang@mediatek.com, Woojung.Huh@microchip.com, john@phrozen.org, cphealy@gmail.com To: netdev@vger.kernel.org Return-path: Received: from mail-ot0-f193.google.com ([74.125.82.193]:40845 "EHLO mail-ot0-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751848AbeEETEf (ORCPT ); Sat, 5 May 2018 15:04:35 -0400 Received: by mail-ot0-f193.google.com with SMTP id n1-v6so28012944otf.7 for ; Sat, 05 May 2018 12:04:35 -0700 (PDT) In-Reply-To: <20180505190425.14378-1-f.fainelli@gmail.com> Sender: netdev-owner@vger.kernel.org List-ID: The GPIO provider for the link GPIO line might require the use of the _cansleep() API, utilize that. This is safe to do since we run in workqueue context. Fixes: 9525ae83959b ("phylink: add phylink infrastructure") Signed-off-by: Florian Fainelli --- drivers/net/phy/phylink.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/phy/phylink.c b/drivers/net/phy/phylink.c index c582b2d7546c..412d1cf4fa66 100644 --- a/drivers/net/phy/phylink.c +++ b/drivers/net/phy/phylink.c @@ -360,7 +360,7 @@ static void phylink_get_fixed_state(struct phylink *pl, struct phylink_link_stat if (pl->get_fixed_state) pl->get_fixed_state(pl->netdev, state); else if (pl->link_gpio) - state->link = !!gpiod_get_value(pl->link_gpio); + state->link = !!gpiod_get_value_cansleep(pl->link_gpio); } /* Flow control is resolved according to our and the link partners -- 2.17.0