linux-iio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] adc:cpcap-adc: Fix IRQ flags for using threaded handler
@ 2018-01-11  7:11 venkat.prashanth2498
  2018-01-14 12:27 ` Jonathan Cameron
  0 siblings, 1 reply; 4+ messages in thread
From: venkat.prashanth2498 @ 2018-01-11  7:11 UTC (permalink / raw)
  To: lars, Michael.Hennerich, jic23
  Cc: knaack.h, pmeerw, linux-iio, Venkat Prashanth B U

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

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@gmail.com>
---
 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


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-01-20 16:05 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-01-11  7:11 [PATCH] adc:cpcap-adc: Fix IRQ flags for using threaded handler venkat.prashanth2498
2018-01-14 12:27 ` Jonathan Cameron
2018-01-19 15:10   ` Tony Lindgren
2018-01-20 16:05     ` Jonathan Cameron

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).