From: Florian Fainelli <f.fainelli@gmail.com>
To: netdev@vger.kernel.org
Cc: Florian Fainelli <f.fainelli@gmail.com>,
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
Subject: [PATCH net-next 1/9] net: phy: phylink: Use gpiod_get_value_cansleep()
Date: Sat, 5 May 2018 12:04:17 -0700 [thread overview]
Message-ID: <20180505190425.14378-2-f.fainelli@gmail.com> (raw)
In-Reply-To: <20180505190425.14378-1-f.fainelli@gmail.com>
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>
---
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
next prev parent reply other threads:[~2018-05-05 19:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-05-05 19:04 [PATCH net-next 0/9] net: dsa: Plug in PHYLINK support Florian Fainelli
2018-05-05 19:04 ` Florian Fainelli [this message]
2018-05-05 19:04 ` [PATCH net-next 2/9] net: phy: phylink: Release link GPIO Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 3/9] net: phy: phylink: Poll link GPIOs Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 4/9] net: dsa: Add PHYLINK switch operations Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 5/9] net: dsa: bcm_sf2: Implement phylink_mac_ops Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 6/9] net: dsa: Eliminate dsa_slave_get_link() Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 7/9] net: dsa: mv88e6xxx: add PHYLINK support Florian Fainelli
2018-05-06 17:26 ` Andrew Lunn
2018-05-06 17:45 ` Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 8/9] net: dsa: Plug in " Florian Fainelli
2018-05-05 19:04 ` [PATCH net-next 9/9] net: dsa: bcm_sf2: Get rid of PHYLIB functions Florian Fainelli
2018-05-09 0:17 ` [PATCH net-next 0/9] net: dsa: Plug in PHYLINK support David Miller
2018-05-09 0:20 ` Florian Fainelli
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20180505190425.14378-2-f.fainelli@gmail.com \
--to=f.fainelli@gmail.com \
--cc=Woojung.Huh@microchip.com \
--cc=andrew@lunn.ch \
--cc=cphealy@gmail.com \
--cc=davem@davemloft.net \
--cc=john@phrozen.org \
--cc=netdev@vger.kernel.org \
--cc=privat@egil-hjelmeland.no \
--cc=rmk+kernel@armlinux.org.uk \
--cc=sean.wang@mediatek.com \
--cc=vivien.didelot@savoirfairelinux.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.