* [PATCH] lis3lv02d: Omit IRQF_ONESHOT if no threaded handler is provided
@ 2026-03-26 18:04 Ard Biesheuvel
0 siblings, 0 replies; only message in thread
From: Ard Biesheuvel @ 2026-03-26 18:04 UTC (permalink / raw)
To: linux-kernel; +Cc: Ard Biesheuvel, Eric Piel, Arnd Bergmann, Greg Kroah-Hartman
The lis3lv02d started triggering a WARN in the IRQ code because it
passes IRQF_ONESHOT to request_threaded_irq() even when thread_fn is
NULL, which is an invalid combination.
So set the flag only if thread_fn is non-NULL.
Cc: Eric Piel <eric.piel@tremplin-utc.net>
Cc: Arnd Bergmann <arnd@arndb.de>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Ard Biesheuvel <ardb@kernel.org>
---
drivers/misc/lis3lv02d/lis3lv02d.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/drivers/misc/lis3lv02d/lis3lv02d.c b/drivers/misc/lis3lv02d/lis3lv02d.c
index 9c68f8b1d5d6..21e8ad0a7444 100644
--- a/drivers/misc/lis3lv02d/lis3lv02d.c
+++ b/drivers/misc/lis3lv02d/lis3lv02d.c
@@ -1230,10 +1230,12 @@ int lis3lv02d_init_device(struct lis3lv02d *lis3)
else
thread_fn = NULL;
+ if (thread_fn)
+ irq_flags |= IRQF_ONESHOT;
+
err = request_threaded_irq(lis3->irq, lis302dl_interrupt,
thread_fn,
- IRQF_TRIGGER_RISING | IRQF_ONESHOT |
- irq_flags,
+ irq_flags | IRQF_TRIGGER_RISING,
DRIVER_NAME, lis3);
if (err < 0) {
--
2.53.0
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2026-03-26 18:05 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 18:04 [PATCH] lis3lv02d: Omit IRQF_ONESHOT if no threaded handler is provided Ard Biesheuvel
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox