Merge branches 'irq/genirq', 'irq/sparseirq' and 'irq/urgent' into irq/core
[linux-2.6.git] / kernel / irq / chip.c
index 7de11bd..03d0bed 100644 (file)
@@ -78,6 +78,7 @@ void dynamic_irq_cleanup(unsigned int irq)
        desc->handle_irq = handle_bad_irq;
        desc->chip = &no_irq_chip;
        desc->name = NULL;
+       clear_kstat_irqs(desc);
        spin_unlock_irqrestore(&desc->lock, flags);
 }
 
@@ -290,7 +291,8 @@ static inline void mask_ack_irq(struct irq_desc *desc, int irq)
                desc->chip->mask_ack(irq);
        else {
                desc->chip->mask(irq);
-               desc->chip->ack(irq);
+               if (desc->chip->ack)
+                       desc->chip->ack(irq);
        }
 }
 
@@ -476,7 +478,8 @@ handle_edge_irq(unsigned int irq, struct irq_desc *desc)
        kstat_incr_irqs_this_cpu(irq, desc);
 
        /* Start handling the irq */
-       desc->chip->ack(irq);
+       if (desc->chip->ack)
+               desc->chip->ack(irq);
        desc = irq_remap_to_desc(irq, desc);
 
        /* Mark the IRQ currently in progress.*/