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

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

 



On Thu, 11 Jan 2018 12:41:00 +0530
+ CC: Tony as the author of the driver.

venkat.prashanth2498@xxxxxxxxx wrote:

> 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>

This looks right but it is rather odd as this should have broken a long
time ago now when the irq core started getting fussy about this...

Back in 2012

https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=1c6c69525b

Given driver is from 2017 I'm rather surprised...

Jonathan
> ---
>  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

--
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