[PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD

Felix Gu posted 1 patch 1 month, 1 week ago
drivers/iio/adc/ti-ads1119.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
[PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by Felix Gu 1 month, 1 week ago
Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
in IRQ request and gives a warning if there is no threaded handler.

Since there is no threaded handler, replace devm_request_threaded_irq
with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.

Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
Signed-off-by: Felix Gu <ustc.gu@gmail.com>
---
 drivers/iio/adc/ti-ads1119.c | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/drivers/iio/adc/ti-ads1119.c b/drivers/iio/adc/ti-ads1119.c
index c9cedc59cdcd..d92a20945b80 100644
--- a/drivers/iio/adc/ti-ads1119.c
+++ b/drivers/iio/adc/ti-ads1119.c
@@ -735,10 +735,8 @@ static int ads1119_probe(struct i2c_client *client)
 		return dev_err_probe(dev, ret, "Failed to setup IIO buffer\n");
 
 	if (client->irq > 0) {
-		ret = devm_request_threaded_irq(dev, client->irq,
-						ads1119_irq_handler,
-						NULL, IRQF_ONESHOT,
-						"ads1119", indio_dev);
+		ret = devm_request_irq(dev, client->irq, ads1119_irq_handler,
+				       IRQF_NO_THREAD, "ads1119", indio_dev);
 		if (ret)
 			return dev_err_probe(dev, ret,
 					     "Failed to allocate irq\n");

---
base-commit: 3fa5e5702a82d259897bd7e209469bc06368bf31
change-id: 20260302-ti-ads1119-93c524003d3f

Best regards,
-- 
Felix Gu <ustc.gu@gmail.com>
Re: [PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by Andy Shevchenko 1 month, 1 week ago
On Tue, Mar 03, 2026 at 12:00:04AM +0800, Felix Gu wrote:
> Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
> without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
> in IRQ request and gives a warning if there is no threaded handler.
> 
> Since there is no threaded handler, replace devm_request_threaded_irq
> with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.

...

>  		if (ret)
>  			return dev_err_probe(dev, ret,
>  					     "Failed to allocate irq\n");

Also consider dropping this duplicate message as the callee does it already.

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by Andy Shevchenko 1 month, 1 week ago
On Mon, Mar 02, 2026 at 06:42:11PM +0200, Andy Shevchenko wrote:
> On Tue, Mar 03, 2026 at 12:00:04AM +0800, Felix Gu wrote:

...

> >  		if (ret)
> >  			return dev_err_probe(dev, ret,
> >  					     "Failed to allocate irq\n");
> 
> Also consider dropping this duplicate message as the callee does it already.

(In a separate patch, obviously.)

-- 
With Best Regards,
Andy Shevchenko
Re: [PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by Felix Gu 1 month, 1 week ago
On Tue, Mar 3, 2026 at 12:43 AM Andy Shevchenko
<andriy.shevchenko@intel.com> wrote:
>
> On Mon, Mar 02, 2026 at 06:42:11PM +0200, Andy Shevchenko wrote:
> > On Tue, Mar 03, 2026 at 12:00:04AM +0800, Felix Gu wrote:
>
> ...
>
> > >             if (ret)
> > >                     return dev_err_probe(dev, ret,
> > >                                          "Failed to allocate irq\n");
> >
> > Also consider dropping this duplicate message as the callee does it already.
>
> (In a separate patch, obviously.)
>
> --
> With Best Regards,
> Andy Shevchenko
>
>
Hi Andy,
I will draft a patch for it.

Best regards,
Felix
Re: [PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by David Lechner 1 month, 1 week ago
On 3/2/26 10:00 AM, Felix Gu wrote:
> Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
> without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
> in IRQ request and gives a warning if there is no threaded handler.
> 
> Since there is no threaded handler, replace devm_request_threaded_irq
> with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.
> 
> Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
> Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> ---
Reviewed-by: David Lechner <dlechner@baylibre.com>

Although I would swap the order of paragraphs in the commit
message. The second one is the real problem (so should go first)
and the first one is just how the problem was found.
Re: [PATCH] iio: adc: ti-ads1119: Replace IRQF_ONESHOT with IRQF_NO_THREAD
Posted by Jonathan Cameron 1 month, 1 week ago
On Mon, 2 Mar 2026 10:15:04 -0600
David Lechner <dlechner@baylibre.com> wrote:

> On 3/2/26 10:00 AM, Felix Gu wrote:
> > Since commit aef30c8d569c ("genirq: Warn about using IRQF_ONESHOT
> > without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
> > in IRQ request and gives a warning if there is no threaded handler.
> > 
> > Since there is no threaded handler, replace devm_request_threaded_irq
> > with devm_request_irq, and replace IRQF_ONESHOT with IRQF_NO_THREAD.
> > 
> > Fixes: a9306887eba4 ("iio: adc: ti-ads1119: Add driver")
> > Signed-off-by: Felix Gu <ustc.gu@gmail.com>
> > ---  
> Reviewed-by: David Lechner <dlechner@baylibre.com>
> 
> Although I would swap the order of paragraphs in the commit
> message. The second one is the real problem (so should go first)
> and the first one is just how the problem was found.

I rewrote the commit message along those lines and called
out why it needs IRQF_NO_THREAD.

Applied to the fixes-togreg branch of iio.git and marked for stable.

Given proximity to the patch removing the message, it may be this
will cause some slight mess in linux-next.

Thanks,

Jonathan