From: Axel Lin <axel.lin@ingics.com>
To: Linus Walleij <linus.walleij@linaro.org>
Cc: "Andrew F. Davis" <afd@ti.com>,
Alexandre Courbot <gnurou@gmail.com>,
linux-gpio@vger.kernel.org
Subject: [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()
Date: Wed, 24 Feb 2016 21:31:14 +0800 [thread overview]
Message-ID: <1456320674.8959.1.camel@ingics.com> (raw)
This driver has .can_sleep flag set.
So the pisosr_gpio_get() can be called from contexts that can sleep.
Thus use the cansleep() variant in pisosr_gpio_refresh().
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
drivers/gpio/gpio-pisosr.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/gpio/gpio-pisosr.c b/drivers/gpio/gpio-pisosr.c
index f9f1074..597cec6 100644
--- a/drivers/gpio/gpio-pisosr.c
+++ b/drivers/gpio/gpio-pisosr.c
@@ -46,9 +46,9 @@ static int pisosr_gpio_refresh(struct pisosr_gpio *gpio)
mutex_lock(&gpio->lock);
if (gpio->load_gpio) {
- gpiod_set_value(gpio->load_gpio, 1);
+ gpiod_set_value_cansleep(gpio->load_gpio, 1);
udelay(1); /* registers load time (~10ns) */
- gpiod_set_value(gpio->load_gpio, 0);
+ gpiod_set_value_cansleep(gpio->load_gpio, 0);
udelay(1); /* registers recovery time (~5ns) */
}
--
2.1.4
next reply other threads:[~2016-02-24 13:31 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-02-24 13:31 Axel Lin [this message]
2016-02-25 14:10 ` [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh() Linus Walleij
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=1456320674.8959.1.camel@ingics.com \
--to=axel.lin@ingics.com \
--cc=afd@ti.com \
--cc=gnurou@gmail.com \
--cc=linus.walleij@linaro.org \
--cc=linux-gpio@vger.kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).