提交 9e9509e3 编写于 作者: M Michał Mirosław 提交者: Linus Walleij

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: 3c92db9aSigned-off-by: NMichał Mirosław <mirq-linux@rere.qmqm.pl>
[Also changed the variable to a bool]
Signed-off-by: NLinus Walleij <linus.walleij@linaro.org>
上级 df1e76f2
...@@ -360,7 +360,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) ...@@ -360,7 +360,7 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
{ {
int port; int port;
int pin; int pin;
int unmasked = 0; bool unmasked = false;
int gpio; int gpio;
u32 lvl; u32 lvl;
unsigned long sta; unsigned long sta;
...@@ -384,8 +384,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc) ...@@ -384,8 +384,8 @@ static void tegra_gpio_irq_handler(struct irq_desc *desc)
* before executing the handler so that we don't * before executing the handler so that we don't
* miss edges * miss edges
*/ */
if (lvl & (0x100 << pin)) { if (!unmasked && lvl & (0x100 << pin)) {
unmasked = 1; unmasked = true;
chained_irq_exit(chip, desc); chained_irq_exit(chip, desc);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册