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);
p = &desc->action;
for (;;) {
action = *p;
- pp = p;
if (!action) {
WARN(1, "Trying to free already-free IRQ %d\n", irq);
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