Re: request_irq() usage in wm8350_register_irq().

From: Richard Fitzgerald

Date: Wed Jan 21 2026 - 07:06:53 EST


On 21/01/2026 11:36 am, Sebastian Andrzej Siewior wrote:
On 2026-01-21 11:22:32 [+0000], Richard Fitzgerald wrote:
Or because request_threaded_irq() supplies a default handler, so
handler!=NULL when it calls __setup_irq().


int request_threaded_irq(unsigned int irq, irq_handler_t handler,
irq_handler_t thread_fn, unsigned long irqflags,
const char *devname, void *dev_id)
{

...

if (!handler) {
if (!thread_fn)
return -EINVAL;
handler = irq_default_primary_handler;
}

...


retval = __setup_irq(irq, desc, action);

...
}

->

| } else if (new->handler == irq_default_primary_handler &&
| !(desc->irq_data.chip->flags & IRQCHIP_ONESHOT_SAFE)) {

| pr_err("Threaded irq requested with handler=NULL and !ONESHOT for %s (irq %d)\n",
| new->name, irq);
| ret = -EINVAL;

Sebastian

Ah. I didn't notice that. Confusing error message. It says
"handler=NULL" but handler != NULL. More like "handler=default".