aboutsummaryrefslogtreecommitdiffstats
path: root/sound
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-20 08:50:10 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-07-20 15:50:08 -0400
commit3198b9eb514fd27dd15c55f36b17ac2cddade1a5 (patch)
tree410d96c95929162ce55e03708da9f839c388c488 /sound
parent09bddc8eb26eeb976efcfde9569b5ad1d9b77574 (diff)
ASoC: Acknowledge WM8962 interrupts before acting on them
This closes the small race between a status being read in response to an interrupt and clearing the interrupt, meaning that if the status changes between those periods we might not get a reassertion of the interrupt. Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Liam Girdwood <lrg@ti.com>
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/codecs/wm8962.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c
index 8499c563a9b5..60d740ebeb5b 100644
--- a/sound/soc/codecs/wm8962.c
+++ b/sound/soc/codecs/wm8962.c
@@ -3409,6 +3409,9 @@ static irqreturn_t wm8962_irq(int irq, void *data)
3409 active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2); 3409 active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2);
3410 active &= ~mask; 3410 active &= ~mask;
3411 3411
3412 /* Acknowledge the interrupts */
3413 snd_soc_write(codec, WM8962_INTERRUPT_STATUS_2, active);
3414
3412 if (active & WM8962_FLL_LOCK_EINT) { 3415 if (active & WM8962_FLL_LOCK_EINT) {
3413 dev_dbg(codec->dev, "FLL locked\n"); 3416 dev_dbg(codec->dev, "FLL locked\n");
3414 complete(&wm8962->fll_lock); 3417 complete(&wm8962->fll_lock);
@@ -3433,9 +3436,6 @@ static irqreturn_t wm8962_irq(int irq, void *data)
3433 msecs_to_jiffies(250)); 3436 msecs_to_jiffies(250));
3434 } 3437 }
3435 3438
3436 /* Acknowledge the interrupts */
3437 snd_soc_write(codec, WM8962_INTERRUPT_STATUS_2, active);
3438
3439 return IRQ_HANDLED; 3439 return IRQ_HANDLED;
3440} 3440}
3441 3441