ASoC: max98090: request IRQF_ONESHOT interrupt
authorAndrew Bresticker <abrestic@chromium.org>
Mon, 20 May 2013 05:58:07 +0000 (22:58 -0700)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 20 May 2013 12:58:49 +0000 (13:58 +0100)
request_threaded_irq() rejects calls which both do not specify a handler
(indicating that the primary IRQ handler should be used) and do not set
IRQF_ONESHOT because the combination is unsafe with level-triggered
interrupts.  It is safe in this case, though, since max98090 IRQs are
edge-triggered and the interrupts aren't ACK'ed until the codec's IRQ
status register is read.  Because of this, an IRQF_ONESHOT interrupt
doesn't really make a difference, but request one anyway in order to make
request_threaded_irq() happy.

Signed-off-by: Andrew Bresticker <abrestic@chromium.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/max98090.c

index ce0d36412c97d73eaa27c59de88c0ee44ce6066c..8d14a76c7249ade32bdc627fee92a5cefe6eaf91 100644 (file)
@@ -2233,7 +2233,7 @@ static int max98090_probe(struct snd_soc_codec *codec)
        dev_dbg(codec->dev, "irq = %d\n", max98090->irq);
 
        ret = request_threaded_irq(max98090->irq, NULL,
-               max98090_interrupt, IRQF_TRIGGER_FALLING,
+               max98090_interrupt, IRQF_TRIGGER_FALLING | IRQF_ONESHOT,
                "max98090_interrupt", codec);
        if (ret < 0) {
                dev_err(codec->dev, "request_irq failed: %d\n",