[ARM] Only call set_type method in setup_irq if it's defined
authorRussell King <rmk@dyn-67.arm.linux.org.uk>
Mon, 9 Jan 2006 19:19:18 +0000 (19:19 +0000)
committerRussell King <rmk+kernel@arm.linux.org.uk>
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 b5645c4462cffa95f5887d2cf8b8c9cfcbd2e4a1..1d50d2b98f55a6a0d2835e506c94e6c06dfda0c4 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);
                }