ASoC: wm5100: Pass the IRQF_ONESHOT flag
authorFabio Estevam <fabio.estevam@freescale.com>
Tue, 12 May 2015 04:22:57 +0000 (01:22 -0300)
committerMark Brown <broonie@kernel.org>
Tue, 12 May 2015 18:46:25 +0000 (19:46 +0100)
Since commit 1c6c69525b40eb76de8adf039409722015927dc3 ("genirq: Reject
bogus threaded irq requests") threaded IRQs without a primary handler
need to be requested with IRQF_ONESHOT, otherwise the request will fail.

So pass the IRQF_ONESHOT flag in this case.

The semantic patch that makes this change is available
in scripts/coccinelle/misc/irqf_oneshot.cocci.

Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
sound/soc/codecs/wm5100.c

index 96740379b711bf2d5816666772fabf92e85124d9..5de28bfd107920ed72cb6230f203376f35c997d5 100644 (file)
@@ -2570,11 +2570,13 @@ static int wm5100_i2c_probe(struct i2c_client *i2c,
 
                if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING))
                        ret = request_threaded_irq(i2c->irq, NULL,
-                                                  wm5100_edge_irq, irq_flags,
+                                                  wm5100_edge_irq,
+                                                  irq_flags | IRQF_ONESHOT,
                                                   "wm5100", wm5100);
                else
                        ret = request_threaded_irq(i2c->irq, NULL, wm5100_irq,
-                                                  irq_flags, "wm5100",
+                                                  irq_flags | IRQF_ONESHOT,
+                                                  "wm5100",
                                                   wm5100);
 
                if (ret != 0) {