Re: [PATCH] Replace NULL thread handler with a dummy function.

Andy Shevchenko
2026-02-28T10:15:56Z

On Sat, Feb 28, 2026 at 10:36:46AM +0800, junan wrote:
> Hi,
>
> This is a similar problem as [1]:

> [1] https://lore.kernel.org/linux-iio/20260227071409.aEG-iBFD@linutronix.de/T/#m15ab81856b42f72169fe51bd87fa399b5147441f
>

Make it a Link tag.

> without a threaded handler"), the IRQ core checks IRQF_ONESHOT flag
> in IRQ request and gives a warning if there is no threaded handler.
>
> There are two iio devices on my machine:

IIO

> ```
> junan@fedora:~$ ls /sys/bus/iio/devices/
> iio:device0 trigger0
> junan@fedora:~$ cat /sys/bus/iio/devices/*/name
> als
> als-dev0
> ```
>
> The function calling chain is as following:
>
> hid_als_probe(hid-sensor-als.c)
> => hid_sensor_setup_trigger(hid-sensor-trigger.c)
> => iio_triggered_buffer_setup_ext(industrialio-triggered-buffer.c)
>
> `iio_triggered_buffer_setup_ext` is called with a NULL thread handler, and the flag is set to `IRQF_ONESHOT` inside it.

> I am not sure which flag to change, so I replace the NULL pointer with a
> dummy function or can we just change the flag?

Besides you used way too long lines, the last sentence (question) has to be
located in the comment block...

> Signed-off-by: junan <junan76@163.com>
> ---

...somewhere here.

And answering to it I think it's band-aid and wrong approach.

--
With Best Regards,
Andy Shevchenko