summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpiolib.c
diff options
context:
space:
mode:
authorAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-30 18:50:18 -0300
committerAndré Fabian Silva Delgado <emulatorman@parabola.nu>2016-11-30 18:50:18 -0300
commit62e27076b7a48d1c8fc4eed59ff75f6382915c46 (patch)
treebf42384a97f0367a9fac81f3aa29da7815396958 /drivers/gpio/gpiolib.c
parentd26f4ddb48463e2ff798859505af1cc520e75685 (diff)
Linux-libre 4.8.11-gnupck-4.8.11-gnu
Diffstat (limited to 'drivers/gpio/gpiolib.c')
-rw-r--r--drivers/gpio/gpiolib.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c
index b2dee1024..15704aaf9 100644
--- a/drivers/gpio/gpiolib.c
+++ b/drivers/gpio/gpiolib.c
@@ -2667,8 +2667,11 @@ int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset)
if (IS_ERR(desc))
return PTR_ERR(desc);
- /* Flush direction if something changed behind our back */
- if (chip->get_direction) {
+ /*
+ * If it's fast: flush the direction setting if something changed
+ * behind our back
+ */
+ if (!chip->can_sleep && chip->get_direction) {
int dir = chip->get_direction(chip, offset);
if (dir)