diff options
author | Ingo Molnar <mingo@elte.hu> | 2009-02-17 20:28:29 +0100 |
---|---|---|
committer | Ingo Molnar <mingo@elte.hu> | 2009-02-17 20:28:29 +0100 |
commit | 8316e38100c70cd1443ac90074eccdd033aa218d (patch) | |
tree | 155392d9a76df31a1934c181d24467cd93294986 /kernel/irq/manage.c | |
parent | ae88a23b32fa7e0dc9fa7ce735966e68eb41b0bc (diff) |
irq: further clean up the free_irq() code flow
Linus noticed that the 'pp' variable can be eliminated
altogether, and the loop can be cleaned up further.
Cc: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Diffstat (limited to 'kernel/irq/manage.c')
-rw-r--r-- | kernel/irq/manage.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/kernel/irq/manage.c b/kernel/irq/manage.c index 7a954b860c07..de5a765e88ab 100644 --- a/kernel/irq/manage.c +++ b/kernel/irq/manage.c @@ -575,7 +575,7 @@ int setup_irq(unsigned int irq, struct irqaction *act) void free_irq(unsigned int irq, void *dev_id) { struct irq_desc *desc = irq_to_desc(irq); - struct irqaction *action, **p, **pp; + struct irqaction *action, **p; unsigned long flags; WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq); @@ -592,7 +592,6 @@ void free_irq(unsigned int irq, void *dev_id) p = &desc->action; for (;;) { action = *p; - pp = p; if (!action) { WARN(1, "Trying to free already-free IRQ %d\n", irq); @@ -601,15 +600,13 @@ void free_irq(unsigned int irq, void *dev_id) return; } + if (action->dev_id == dev_id) + break; p = &action->next; - if (action->dev_id != dev_id) - continue; - - break; } /* Found it - now remove it from the list of entries: */ - *pp = action->next; + *p = action->next; /* Currently used only by UML, might disappear one day: */ #ifdef CONFIG_IRQ_RELEASE_METHOD |