]> git.karo-electronics.de Git - mv-sheeva.git/blobdiff - kernel/irq/chip.c
Merge master.kernel.org:/pub/scm/linux/kernel/git/davej/agpgart
[mv-sheeva.git] / kernel / irq / chip.c
index 54105bdfe20de4609c9f62c6f901e5f0ce658f08..736cb0bd498f8ff5c7a50d8b60e3130da43d9d7f 100644 (file)
@@ -40,10 +40,6 @@ int set_irq_chip(unsigned int irq, struct irq_chip *chip)
        spin_lock_irqsave(&desc->lock, flags);
        irq_chip_set_defaults(chip);
        desc->chip = chip;
-       /*
-        * For compatibility only:
-        */
-       desc->chip = chip;
        spin_unlock_irqrestore(&desc->lock, flags);
 
        return 0;
@@ -146,7 +142,7 @@ static void default_disable(unsigned int irq)
        struct irq_desc *desc = irq_desc + irq;
 
        if (!(desc->status & IRQ_DELAYED_DISABLE))
-               irq_desc[irq].chip->mask(irq);
+               desc->chip->mask(irq);
 }
 
 /*
@@ -252,7 +248,7 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
        mask_ack_irq(desc, irq);
 
        if (unlikely(desc->status & IRQ_INPROGRESS))
-               goto out;
+               goto out_unlock;
        desc->status &= ~(IRQ_REPLAY | IRQ_WAITING);
        kstat_cpu(cpu).irqs[irq]++;
 
@@ -261,10 +257,13 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
         * keep it masked and get out of here
         */
        action = desc->action;
-       if (unlikely(!action || (desc->status & IRQ_DISABLED)))
-               goto out;
+       if (unlikely(!action || (desc->status & IRQ_DISABLED))) {
+               desc->status |= IRQ_PENDING;
+               goto out_unlock;
+       }
 
        desc->status |= IRQ_INPROGRESS;
+       desc->status &= ~IRQ_PENDING;
        spin_unlock(&desc->lock);
 
        action_ret = handle_IRQ_event(irq, regs, action);
@@ -273,9 +272,9 @@ handle_level_irq(unsigned int irq, struct irq_desc *desc, struct pt_regs *regs)
 
        spin_lock(&desc->lock);
        desc->status &= ~IRQ_INPROGRESS;
-out:
        if (!(desc->status & IRQ_DISABLED) && desc->chip->unmask)
                desc->chip->unmask(irq);
+out_unlock:
        spin_unlock(&desc->lock);
 }