[PATCH] genirq: fix irq flow handler uninstall
authorThomas Gleixner <tglx@linutronix.de>
Fri, 22 Dec 2006 09:08:14 +0000 (01:08 -0800)
committerLinus Torvalds <torvalds@woody.osdl.org>
Fri, 22 Dec 2006 16:55:48 +0000 (08:55 -0800)
The sanity check for no_irq_chip in __set_irq_hander() is unconditional on
both install and uninstall of an handler.  This triggers false warnings and
replaces no_irq_chip by dummy_irq_chip in the uninstall case.

Check only, when a real handler is installed.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Acked-by: Ingo Molnar <mingo@elte.hu>
Acked-by: Sylvain Munaut <tnt@246tNt.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
kernel/irq/chip.c

index 1c1b7125b8ac4b72ff0a0dad11977f7d58758ec2..d27b2585574318ff2a3dd9e21b798c21164fa302 100644 (file)
@@ -517,8 +517,7 @@ __set_irq_handler(unsigned int irq, irq_flow_handler_t handle, int is_chained,
 
        if (!handle)
                handle = handle_bad_irq;
-
-       if (desc->chip == &no_irq_chip) {
+       else if (desc->chip == &no_irq_chip) {
                printk(KERN_WARNING "Trying to install %sinterrupt handler "
                       "for IRQ%d\n", is_chained ? "chained " : "", irq);
                /*