summaryrefslogtreecommitdiff
path: root/drivers/gpio/gpio-lynxpoint.c
diff options
context:
space:
mode:
authorGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-20 00:14:34 +0400
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2013-10-20 00:14:34 +0400
commitf7a0fd56e4f58aec3300082fc10433052e2f1863 (patch)
tree4b3348f4866f6b3417f456a298229d63d4581424 /drivers/gpio/gpio-lynxpoint.c
parent5e1e704a7de14ae79dc4d983dbbcab67064960c9 (diff)
parent31d141e3a666269a3b6fcccddb0351caf7454240 (diff)
downloadlinux-f7a0fd56e4f58aec3300082fc10433052e2f1863.tar.xz
Merge 3.12-rc6 into staging-next.
We want these fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/gpio/gpio-lynxpoint.c')
-rw-r--r--drivers/gpio/gpio-lynxpoint.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/gpio/gpio-lynxpoint.c b/drivers/gpio/gpio-lynxpoint.c
index 2d9ca6055e5e..41b5913ddabe 100644
--- a/drivers/gpio/gpio-lynxpoint.c
+++ b/drivers/gpio/gpio-lynxpoint.c
@@ -248,14 +248,15 @@ static void lp_gpio_irq_handler(unsigned irq, struct irq_desc *desc)
struct lp_gpio *lg = irq_data_get_irq_handler_data(data);
struct irq_chip *chip = irq_data_get_irq_chip(data);
u32 base, pin, mask;
- unsigned long reg, pending;
+ unsigned long reg, ena, pending;
unsigned virq;
/* check from GPIO controller which pin triggered the interrupt */
for (base = 0; base < lg->chip.ngpio; base += 32) {
reg = lp_gpio_reg(&lg->chip, base, LP_INT_STAT);
+ ena = lp_gpio_reg(&lg->chip, base, LP_INT_ENABLE);
- while ((pending = inl(reg))) {
+ while ((pending = (inl(reg) & inl(ena)))) {
pin = __ffs(pending);
mask = BIT(pin);
/* Clear before handling so we don't lose an edge */