[PATCH] adc:cpcap-adc: Fix IRQ flags for using threaded handler

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Venkat Prashanth B U <venkat.prashanth2498@xxxxxxxxx>

Mark the request with ONESHOT using IRQF_ONESHOT.

Semantic patch information:
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.

Generated by: scripts/coccinelle/misc/irqf_oneshot.cocci

Signed-off-by: Venkat Prashanth B U <venkat.prashanth2498@xxxxxxxxx>
---
 drivers/iio/adc/cpcap-adc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/iio/adc/cpcap-adc.c b/drivers/iio/adc/cpcap-adc.c
index 9ad6042..b73fa46 100644
--- a/drivers/iio/adc/cpcap-adc.c
+++ b/drivers/iio/adc/cpcap-adc.c
@@ -1015,9 +1015,9 @@ static int cpcap_adc_probe(struct platform_device *pdev)
 		return -ENODEV;

 	error = devm_request_threaded_irq(&pdev->dev, ddata->irq, NULL,
-					  cpcap_adc_irq_thread,
-					  IRQF_TRIGGER_NONE,
-					  "cpcap-adc", indio_dev);
+				cpcap_adc_irq_thread,
+				IRQF_TRIGGER_NONE | IRQF_ONESHOT,
+				"cpcap-adc", indio_dev);
 	if (error) {
 		dev_err(&pdev->dev, "could not get irq: %i\n",
 			error);
--
1.9.1

--
To unsubscribe from this list: send the line "unsubscribe linux-iio" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Input]     [Linux Kernel]     [Linux SCSI]     [X.org]

  Powered by Linux