Merge git://git.kernel.org/pub/scm/linux/kernel/git/paulus/powerpc
[powerpc.git] / arch / arm / kernel / irq.c
index b5645c4..2d5896b 100644 (file)
@@ -305,14 +305,19 @@ report_bad_irq(unsigned int irq, struct pt_regs *regs, struct irqdesc *desc, int
        static int count = 100;
        struct irqaction *action;
 
-       if (!count || noirqdebug)
+       if (noirqdebug)
                return;
 
-       count--;
-
        if (ret != IRQ_HANDLED && ret != IRQ_NONE) {
+               if (!count)
+                       return;
+               count--;
                printk("irq%u: bogus retval mask %x\n", irq, ret);
        } else {
+               desc->irqs_unhandled++;
+               if (desc->irqs_unhandled <= 99900)
+                       return;
+               desc->irqs_unhandled = 0;
                printk("irq%u: nobody cared\n", irq);
        }
        show_regs(regs);
@@ -710,7 +715,8 @@ int setup_irq(unsigned int irq, struct irqaction *new)
                desc->pending = 0;
                desc->disable_depth = 1;
 
-               if (new->flags & SA_TRIGGER_MASK) {
+               if (new->flags & SA_TRIGGER_MASK &&
+                   desc->chip->set_type) {
                        unsigned int type = new->flags & SA_TRIGGER_MASK;
                        desc->chip->set_type(irq, type);
                }