irq: Always set IRQF_ONESHOT if no primary handler is specified
authorSebastian Andrzej Siewior <bigeasy@linutronix.de>
Thu, 7 Jul 2011 20:32:17 +0000 (22:32 +0200)
committerThomas Gleixner <tglx@linutronix.de>
Thu, 28 Jul 2011 09:23:21 +0000 (11:23 +0200)
If no primary handler is specified then a default one is assigned
which always returns IRQ_WAKE_THREAD. This handler requires the
IRQF_ONESHOT flag on LEVEL / EIO typed irqs because the source of
interrupt is not disabled. Since it is required for those users and
there is no difference for others it makes sense to add this flag
unconditionally.

Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de>
Link: http://lkml.kernel.org/r/1310070737-18514-1-git-send-email-bigeasy@linutronix.de
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
kernel/irq/manage.c

index 0a7840aeb0fb9efbc18a6e6e8e6f01de17ed91cd..3f9cd4799da70d899f57d5966c4fd9189508e5b3 100644 (file)
@@ -1322,6 +1322,7 @@ int request_threaded_irq(unsigned int irq, irq_handler_t handler,
                if (!thread_fn)
                        return -EINVAL;
                handler = irq_default_primary_handler;
+               irqflags |= IRQF_ONESHOT;
        }
 
        action = kzalloc(sizeof(struct irqaction), GFP_KERNEL);