Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

gpio: pisosr: Use gpiod_set_value_cansleep in pisosr_gpio_refresh()

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>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>

authored by

Axel Lin and committed by
Linus Walleij
ea04a7ca 21d08ab9

+2 -2
+2 -2
drivers/gpio/gpio-pisosr.c
··· 46 46 mutex_lock(&gpio->lock); 47 47 48 48 if (gpio->load_gpio) { 49 - gpiod_set_value(gpio->load_gpio, 1); 49 + gpiod_set_value_cansleep(gpio->load_gpio, 1); 50 50 udelay(1); /* registers load time (~10ns) */ 51 - gpiod_set_value(gpio->load_gpio, 0); 51 + gpiod_set_value_cansleep(gpio->load_gpio, 0); 52 52 udelay(1); /* registers recovery time (~5ns) */ 53 53 } 54 54