diff options
author | Florian Fainelli <f.fainelli@gmail.com> | 2018-05-10 23:17:29 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2018-05-11 19:03:05 +0300 |
commit | bb322a90383603aaf71ad882a7c5a48b39a02603 (patch) | |
tree | 38210f5beba342cb3de858ae1dd10942b44c572a /drivers/net/phy | |
parent | ec9efb523cb8daf7b9d2e5c9cb80b255b716a777 (diff) | |
download | linux-bb322a90383603aaf71ad882a7c5a48b39a02603.tar.xz |
net: phy: phylink: Use gpiod_get_value_cansleep()
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 <f.fainelli@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/phy')
-rw-r--r-- | drivers/net/phy/phylink.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |