Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

mfd: ab8500-gpadc: Pass the IRQF_ONESHOT flag

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: Lee Jones <lee.jones@linaro.org>

authored by

Fabio Estevam and committed by
Lee Jones
e7d8ae3e abe5b47c

+4 -2
+4 -2
drivers/mfd/ab8500-gpadc.c
··· 948 948 if (gpadc->irq_sw >= 0) { 949 949 ret = request_threaded_irq(gpadc->irq_sw, NULL, 950 950 ab8500_bm_gpadcconvend_handler, 951 - IRQF_NO_SUSPEND | IRQF_SHARED, "ab8500-gpadc-sw", 951 + IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT, 952 + "ab8500-gpadc-sw", 952 953 gpadc); 953 954 if (ret < 0) { 954 955 dev_err(gpadc->dev, ··· 962 961 if (gpadc->irq_hw >= 0) { 963 962 ret = request_threaded_irq(gpadc->irq_hw, NULL, 964 963 ab8500_bm_gpadcconvend_handler, 965 - IRQF_NO_SUSPEND | IRQF_SHARED, "ab8500-gpadc-hw", 964 + IRQF_NO_SUSPEND | IRQF_SHARED | IRQF_ONESHOT, 965 + "ab8500-gpadc-hw", 966 966 gpadc); 967 967 if (ret < 0) { 968 968 dev_err(gpadc->dev,