diff options
Diffstat (limited to 'drivers/gpio/gpiolib.c')
| -rw-r--r-- | drivers/gpio/gpiolib.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/gpio/gpiolib.c b/drivers/gpio/gpiolib.c index 93ed0e00c578..868128a676ba 100644 --- a/drivers/gpio/gpiolib.c +++ b/drivers/gpio/gpiolib.c | |||
| @@ -2737,8 +2737,11 @@ int gpiochip_lock_as_irq(struct gpio_chip *chip, unsigned int offset) | |||
| 2737 | if (IS_ERR(desc)) | 2737 | if (IS_ERR(desc)) |
| 2738 | return PTR_ERR(desc); | 2738 | return PTR_ERR(desc); |
| 2739 | 2739 | ||
| 2740 | /* Flush direction if something changed behind our back */ | 2740 | /* |
| 2741 | if (chip->get_direction) { | 2741 | * If it's fast: flush the direction setting if something changed |
| 2742 | * behind our back | ||
| 2743 | */ | ||
| 2744 | if (!chip->can_sleep && chip->get_direction) { | ||
| 2742 | int dir = chip->get_direction(chip, offset); | 2745 | int dir = chip->get_direction(chip, offset); |
| 2743 | 2746 | ||
| 2744 | if (dir) | 2747 | if (dir) |
