[alsa-devel] [PATCH 1/5] ASoC: wm8996: Pass the IRQF_ONESHOT flag
From: Fabio Estevam fabio.estevam@freescale.com
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 --- sound/soc/codecs/wm8996.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8996.c b/sound/soc/codecs/wm8996.c index 3dce507..232f234 100644 --- a/sound/soc/codecs/wm8996.c +++ b/sound/soc/codecs/wm8996.c @@ -2644,10 +2644,12 @@ static int wm8996_probe(struct snd_soc_codec *codec) if (irq_flags & (IRQF_TRIGGER_RISING | IRQF_TRIGGER_FALLING)) ret = request_threaded_irq(i2c->irq, NULL, wm8996_edge_irq, - irq_flags, "wm8996", codec); + irq_flags | IRQF_ONESHOT, + "wm8996", codec); else ret = request_threaded_irq(i2c->irq, NULL, wm8996_irq, - irq_flags, "wm8996", codec); + irq_flags | IRQF_ONESHOT, + "wm8996", codec);
if (ret == 0) { /* Unmask the interrupt */
From: Fabio Estevam fabio.estevam@freescale.com
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 --- sound/soc/codecs/wm5100.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 9674037..5de28bfd 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -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) {
From: Fabio Estevam fabio.estevam@freescale.com
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 --- sound/soc/codecs/wm8994.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/wm8994.c b/sound/soc/codecs/wm8994.c index 2d32b54..dc8f482 100644 --- a/sound/soc/codecs/wm8994.c +++ b/sound/soc/codecs/wm8994.c @@ -4084,7 +4084,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) if (wm8994->micdet_irq) ret = request_threaded_irq(wm8994->micdet_irq, NULL, wm8994_mic_irq, - IRQF_TRIGGER_RISING, + IRQF_TRIGGER_RISING | + IRQF_ONESHOT, "Mic1 detect", wm8994); else @@ -4132,7 +4133,8 @@ static int wm8994_codec_probe(struct snd_soc_codec *codec) if (wm8994->micdet_irq) { ret = request_threaded_irq(wm8994->micdet_irq, NULL, wm8958_mic_irq, - IRQF_TRIGGER_RISING, + IRQF_TRIGGER_RISING | + IRQF_ONESHOT, "Mic detect", wm8994); if (ret != 0)
From: Fabio Estevam fabio.estevam@freescale.com
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 --- sound/soc/codecs/twl6040.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index b8ecce2..4791f9a 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1121,7 +1121,8 @@ static int twl6040_probe(struct snd_soc_codec *codec) mutex_init(&priv->mutex);
ret = request_threaded_irq(priv->plug_irq, NULL, - twl6040_audio_handler, IRQF_NO_SUSPEND, + twl6040_audio_handler, + IRQF_NO_SUSPEND | IRQF_ONESHOT, "twl6040_irq_plug", codec); if (ret) { dev_err(codec->dev, "PLUG IRQ request failed: %d\n", ret);
On Tue, May 12, 2015 at 01:22:59AM -0300, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
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.
Applied, thanks.
From: Fabio Estevam fabio.estevam@freescale.com
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 --- sound/soc/codecs/max98095.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98095.c b/sound/soc/codecs/max98095.c index 66c7ca4..453a919 100644 --- a/sound/soc/codecs/max98095.c +++ b/sound/soc/codecs/max98095.c @@ -2300,8 +2300,8 @@ static int max98095_probe(struct snd_soc_codec *codec) /* register an audio interrupt */ ret = request_threaded_irq(client->irq, NULL, max98095_report_jack, - IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING, - "max98095", codec); + IRQF_TRIGGER_FALLING | IRQF_TRIGGER_RISING | + IRQF_ONESHOT, "max98095", codec); if (ret) { dev_err(codec->dev, "Failed to request IRQ: %d\n", ret); goto err_access;
On Tue, May 12, 2015 at 01:22:56AM -0300, Fabio Estevam wrote:
From: Fabio Estevam fabio.estevam@freescale.com
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.
Applied all, thanks.
participants (2)
-
Fabio Estevam
-
Mark Brown