aboutsummaryrefslogtreecommitdiffstats
path: root/kernel/irq
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/irq')
-rw-r--r--kernel/irq/manage.c11
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)
575void free_irq(unsigned int irq, void *dev_id) 575void free_irq(unsigned int irq, void *dev_id)
576{ 576{
577 struct irq_desc *desc = irq_to_desc(irq); 577 struct irq_desc *desc = irq_to_desc(irq);
578 struct irqaction *action, **p, **pp; 578 struct irqaction *action, **p;
579 unsigned long flags; 579 unsigned long flags;
580 580
581 WARN(in_interrupt(), "Trying to free IRQ %d from IRQ context!\n", irq); 581 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)
592 p = &desc->action; 592 p = &desc->action;
593 for (;;) { 593 for (;;) {
594 action = *p; 594 action = *p;
595 pp = p;
596 595
597 if (!action) { 596 if (!action) {
598 WARN(1, "Trying to free already-free IRQ %d\n", irq); 597 WARN(1, "Trying to free already-free IRQ %d\n", irq);
@@ -601,15 +600,13 @@ void free_irq(unsigned int irq, void *dev_id)
601 return; 600 return;
602 } 601 }
603 602
603 if (action->dev_id == dev_id)
604 break;
604 p = &action->next; 605 p = &action->next;
605 if (action->dev_id != dev_id)
606 continue;
607
608 break;
609 } 606 }
610 607
611 /* Found it - now remove it from the list of entries: */ 608 /* Found it - now remove it from the list of entries: */
612 *pp = action->next; 609 *p = action->next;
613 610
614 /* Currently used only by UML, might disappear one day: */ 611 /* Currently used only by UML, might disappear one day: */
615#ifdef CONFIG_IRQ_RELEASE_METHOD 612#ifdef CONFIG_IRQ_RELEASE_METHOD