[ARM] Only call set_type method in setup_irq if it's defined
Russell King [Mon, 9 Jan 2006 19:19:18 +0000 (19:19 +0000)]
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

arch/arm/kernel/irq.c

index b5645c4..1d50d2b 100644 (file)
@@ -710,7 +710,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                desc->pending = 0;
                desc->disable_depth = 1;
 
-               if (new->flags & SA_TRIGGER_MASK) {
+               if (new->flags & SA_TRIGGER_MASK &&
+                   desc->chip->set_type) {
                        unsigned int type = new->flags & SA_TRIGGER_MASK;
                        desc->chip->set_type(irq, type);
                }