diff options
author | Michał Mirosław <mirq-linux@rere.qmqm.pl> | 2017-07-18 14:35:45 +0200 |
---|---|---|
committer | Linus Walleij <linus.walleij@linaro.org> | 2017-08-02 10:42:38 +0200 |
commit | 9e9509e38fbe034782339eb09c915f0b5765ff69 (patch) | |
tree | cdabc00cf2b3a8f104c2210be59fb308879efab0 /drivers/gpio/gpio-tegra.c | |
parent | df1e76f28ffe87d1b065eecab2d0fbb89e6bdee5 (diff) | |
download | blackbird-op-linux-9e9509e38fbe034782339eb09c915f0b5765ff69.tar.gz blackbird-op-linux-9e9509e38fbe034782339eb09c915f0b5765ff69.zip |
gpio: tegra: fix unbalanced chained_irq_enter/exit
When more than one GPIO IRQs are triggered simultaneously,
tegra_gpio_irq_handler() called chained_irq_exit() multiple
times for one chained_irq_enter().
Fixes: 3c92db9ac0ca3eee8e46e2424b6c074e2e394ad9
Signed-off-by: Michał Mirosław <mirq-linux@rere.qmqm.pl>
[Also changed the variable to a bool]
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'drivers/gpio/gpio-tegra.c')
-rw-r--r-- | drivers/gpio/gpio-tegra.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpio/gpio-tegra.c b/drivers/gpio/gpio-tegra.c index 88529d3c06c9..506c6a67c5fc 100644 --- a/drivers/gpio/gpio-tegra.c +++ b/drivers/gpio/gpio-tegra.c @@ -360,7 +360,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) { int port; int pin; - int unmasked = 0; + bool unmasked = false; int gpio; u32 lvl; unsigned long sta; @@ -384,8 +384,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) * before executing the handler so that we don't * miss edges */ - if (lvl & (0x100 << pin)) { - unmasked = 1; + if (!unmasked && lvl & (0x100 << pin)) { + unmasked = true; chained_irq_exit(chip, desc); } |