summaryrefslogtreecommitdiffstats
path: root/drivers/mfd/wm8994-irq.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-21 11:09:24 +0200
committerSamuel Ortiz <sameo@linux.intel.com>2011-07-31 23:28:27 +0200
commitccd80c7142ba178f5395fe69244e6c4611100511 (patch)
tree6ad46fbf7aebcc2302ad28052bdcea9b4ca308dd /drivers/mfd/wm8994-irq.c
parentmfd: Acknowlege all WM831x IRQs before we handle them (diff)
downloadlinux-ccd80c7142ba178f5395fe69244e6c4611100511.tar.xz
linux-ccd80c7142ba178f5395fe69244e6c4611100511.zip
mfd: Acknowledge WM8994 IRQs before reporting
This ensures we never have a window where we've handled an interrupt but not told the hardware about it. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
Diffstat (limited to 'drivers/mfd/wm8994-irq.c')
-rw-r--r--drivers/mfd/wm8994-irq.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/mfd/wm8994-irq.c b/drivers/mfd/wm8994-irq.c
index 71c6e8f9aedb..d682f7bd112c 100644
--- a/drivers/mfd/wm8994-irq.c
+++ b/drivers/mfd/wm8994-irq.c
@@ -231,12 +231,6 @@ static irqreturn_t wm8994_irq_thread(int irq, void *data)
status[i] &= ~wm8994->irq_masks_cur[i];
}
- /* Report */
- for (i = 0; i < ARRAY_SIZE(wm8994_irqs); i++) {
- if (status[wm8994_irqs[i].reg - 1] & wm8994_irqs[i].mask)
- handle_nested_irq(wm8994->irq_base + i);
- }
-
/* Ack any unmasked IRQs */
for (i = 0; i < ARRAY_SIZE(status); i++) {
if (status[i])
@@ -244,6 +238,12 @@ static irqreturn_t wm8994_irq_thread(int irq, void *data)
status[i]);
}
+ /* Report */
+ for (i = 0; i < ARRAY_SIZE(wm8994_irqs); i++) {
+ if (status[wm8994_irqs[i].reg - 1] & wm8994_irqs[i].mask)
+ handle_nested_irq(wm8994->irq_base + i);
+ }
+
return IRQ_HANDLED;
}