linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()
@ 2016-02-24 13:31 Axel Lin
  2016-02-25 14:10 ` Linus Walleij
  0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2016-02-24 13:31 UTC (permalink / raw)
  To: Linus Walleij; +Cc: Andrew F. Davis, Alexandre Courbot, linux-gpio

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




^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()
  2016-02-24 13:31 [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh() Axel Lin
@ 2016-02-25 14:10 ` Linus Walleij
  0 siblings, 0 replies; 2+ messages in thread
From: Linus Walleij @ 2016-02-25 14:10 UTC (permalink / raw)
  To: Axel Lin; +Cc: Andrew F. Davis, Alexandre Courbot, linux-gpio@vger.kernel.org

On Wed, Feb 24, 2016 at 2:31 PM, Axel Lin <axel.lin@ingics.com> wrote:

> 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>

Patch applied.

Yours,
Linus Walleij

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2016-02-25 14:10 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-02-24 13:31 [PATCH RFT] gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh() Axel Lin
2016-02-25 14:10 ` Linus Walleij

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).