projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
465f2bd
)
gpio/langwell: re-read the IRQ status register after each iteration
author
Mika Westerberg
<
[email protected]
>
Thu, 10 May 2012 10:01:22 +0000
(13:01 +0300)
committer
Grant Likely
<
[email protected]
>
Thu, 10 May 2012 22:35:28 +0000
(16:35 -0600)
The IRQ status register should be re-read after each iteration.
Otherwise the loop misses the interrupt if it gets raised immediately
after handled.
Reported-by: Grant Likely <
[email protected]
>
Signed-off-by: Mika Westerberg <
[email protected]
>
Acked-by: Linus Walleij <
[email protected]
>
Signed-off-by: Grant Likely <
[email protected]
>
drivers/gpio/gpio-langwell.c
patch
|
blob
|
history
diff --git
a/drivers/gpio/gpio-langwell.c
b/drivers/gpio/gpio-langwell.c
index b0673574dc700c851a72415212577a7ab4610d6b..a1c8754f52cf1b523c3da1bb9e572dc084ddde0b 100644
(file)
--- a/
drivers/gpio/gpio-langwell.c
+++ b/
drivers/gpio/gpio-langwell.c
@@
-250,11
+250,9
@@
static void lnw_irq_handler(unsigned irq, struct irq_desc *desc)
/* check GPIO controller to check which pin triggered the interrupt */
for (base = 0; base < lnw->chip.ngpio; base += 32) {
gedr = gpio_reg(&lnw->chip, base, GEDR);
- pending = readl(gedr);
- while (pending) {
+ while ((pending = readl(gedr))) {
gpio = __ffs(pending);
mask = BIT(gpio);
- pending &= ~mask;
/* Clear before handling so we can't lose an edge */
writel(mask, gedr);
generic_handle_irq(irq_find_mapping(lnw->domain,