diff options
author | Axel Lin <axel.lin@ingics.com> | 2016-02-24 16:31:14 +0300 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2016-02-25 17:20:46 +0300 |
commit | ea04a7cae32108624af55d84845e8f4d21c9cb34 (patch) | |
tree | 50090a9640f7464b9aaf39316b2847768224b32a /drivers/gpio/gpio-pisosr.c | |
parent | 21d08ab9c9d8dc17ee650b28cea8b3175065e201 (diff) | |
download | linux-ea04a7cae32108624af55d84845e8f4d21c9cb34.tar.xz |
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>
Diffstat (limited to 'drivers/gpio/gpio-pisosr.c')
-rw-r--r-- | drivers/gpio/gpio-pisosr.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-pisosr.c b/drivers/gpio/gpio-pisosr.c index 8b8bf8f9de6a..cb14b8d1d512 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) */ } |