Skip to content

Commit

Permalink
[ARM] Only call set_type method in setup_irq if it's defined
Browse files Browse the repository at this point in the history
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
  • Loading branch information
Russell King authored and Russell King committed Jan 9, 2006
1 parent 0a3a98f commit 16ed926
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion arch/arm/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit 16ed926

Please sign in to comment.