Re: Using set_irq_handler in set_irq_type callback?

Thomas Gleixner
2009-10-07T10:23:15Z

[-- Attachment #1: Type: TEXT/PLAIN, Size: 553 bytes --]

On Wed, 7 Oct 2009, Uwe Kleine-König wrote:
> I think the fix for that is adding something like:
>
> if (type & IRQ_TYPE_EDGE_BOTH)
> set_irq_handler(irq, handle_edge_irq);
> else
> set_irq_handler(irq, handle_level_irq);
>
> to the chip's .set_type callback. (Doing this directly fails, as
> .set_type holds desc->lock which set_irq_handler acquires, too. So
> maybe I need to code up a handler that checks how a given irq triggers
> and then calls handle_edge_irq or handle_level_irq.)

Nope. See __set_irq_handler_unlocked()

Thanks,

tglx