Fedora kernel-2.6.17-1.2142_FC4 patched with stable patch-2.6.17.4-vs2.0.2-rc26.diff
[linux-2.6.git] / arch / arm26 / kernel / irq.c
index 7869d1b..0934e6f 100644 (file)
@@ -50,7 +50,7 @@ void __init arc_init_irq(void);
 #define MAX_IRQ_CNT    100000
 
 static volatile unsigned long irq_err_count;
-static spinlock_t irq_controller_lock = SPIN_LOCK_UNLOCKED;
+static DEFINE_SPINLOCK(irq_controller_lock);
 
 struct irqdesc irq_desc[NR_IRQS];
 
@@ -141,7 +141,7 @@ int show_interrupts(struct seq_file *p, void *v)
        if (i < NR_IRQS) {
                action = irq_desc[i].action;
                if (!action)
-                       continue;
+                       goto out;
                seq_printf(p, "%3d: %10u ", i, kstat_irqs(i));
                seq_printf(p, "  %s", action->name);
                for (action = action->next; action; action = action->next) {
@@ -152,6 +152,7 @@ int show_interrupts(struct seq_file *p, void *v)
                show_fiq_list(p, v);
                seq_printf(p, "Err: %10lu\n", irq_err_count);
        }
+out:
        return 0;
 }
 
@@ -187,6 +188,7 @@ static void
 __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
 {
        unsigned int status;
+       int ret;
 
        spin_unlock(&irq_controller_lock);
        if (!(action->flags & SA_INTERRUPT))
@@ -194,8 +196,9 @@ __do_irq(unsigned int irq, struct irqaction *action, struct pt_regs *regs)
 
        status = 0;
        do {
-               status |= action->flags;
-               action->handler(irq, action->dev_id, regs);
+               ret = action->handler(irq, action->dev_id, regs);
+               if (ret == IRQ_HANDLED)
+                       status |= action->flags;
                action = action->next;
        } while (action);