From 6a6de9ef5850d063c3d3fb50784bfe3a6d0712c6 Mon Sep 17 00:00:00 2001 From: Thomas Gleixner Date: Thu, 29 Jun 2006 02:24:51 -0700 Subject: [PATCH] genirq: core Core genirq support: add the irq-chip and irq-flow abstractions. Signed-off-by: Thomas Gleixner Signed-off-by: Ingo Molnar Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- kernel/irq/manage.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'kernel/irq/manage.c') diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 1a2e7663096..b61784ee78b 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -153,6 +153,17 @@ int can_request_irq(unsigned int irq, unsigned long irqflags) return !action; } +void compat_irq_chip_set_default_handler(struct irq_desc *desc) +{ + /* + * If the architecture still has not overriden + * the flow handler then zap the default. This + * should catch incorrect flow-type setting. + */ + if (desc->handle_irq == &handle_bad_irq) + desc->handle_irq = NULL; +} + /* * Internal function to register an irqaction - typically used to * allocate special interrupts that are part of the architecture. @@ -217,6 +228,9 @@ int setup_irq(unsigned int irq, struct irqaction *new) desc->status |= IRQ_PER_CPU; #endif if (!shared) { + irq_chip_set_defaults(desc->chip); + compat_irq_chip_set_default_handler(desc); + desc->status &= ~(IRQ_AUTODETECT | IRQ_WAITING | IRQ_INPROGRESS); -- cgit