diff options
author | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-20 13:50:10 +0100 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2011-07-20 20:50:08 +0100 |
commit | 3198b9eb514fd27dd15c55f36b17ac2cddade1a5 (patch) | |
tree | 410d96c95929162ce55e03708da9f839c388c488 /sound | |
parent | 09bddc8eb26eeb976efcfde9569b5ad1d9b77574 (diff) | |
download | op-kernel-dev-3198b9eb514fd27dd15c55f36b17ac2cddade1a5.zip op-kernel-dev-3198b9eb514fd27dd15c55f36b17ac2cddade1a5.tar.gz |
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.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/sound/soc/codecs/wm8962.c b/sound/soc/codecs/wm8962.c index 8499c56..60d740e 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) active = snd_soc_read(codec, WM8962_INTERRUPT_STATUS_2); active &= ~mask; + /* Acknowledge the interrupts */ + snd_soc_write(codec, WM8962_INTERRUPT_STATUS_2, active); + if (active & WM8962_FLL_LOCK_EINT) { dev_dbg(codec->dev, "FLL locked\n"); complete(&wm8962->fll_lock); @@ -3433,9 +3436,6 @@ static irqreturn_t wm8962_irq(int irq, void *data) msecs_to_jiffies(250)); } - /* Acknowledge the interrupts */ - snd_soc_write(codec, WM8962_INTERRUPT_STATUS_2, active); - return IRQ_HANDLED; } |