Messages in this thread | | | Date | Fri, 19 Mar 2010 16:41:56 -0700 | From | Andrew Morton <> | Subject | Re: [PATCH] gpio: add interrupt handling capability to max732x |
| |
On Tue, 16 Mar 2010 11:34:52 +0100 Marc Zyngier <maz@misterjones.org> wrote:
> +static irqreturn_t max732x_irq_handler(int irq, void *devid) > +{ > + struct max732x_chip *chip = devid; > + uint8_t pending; > + uint8_t level; > + > + pending = max732x_irq_pending(chip); > + > + if (!pending) > + return IRQ_HANDLED;
Should be IRQ_NONE?
If this device was on a shared interrupt line and the interrupt was caused by some other device, and this handler is called first then the incorrect IRQ_HANDLED return could cause the irq core to do wrong things.
> + do { > + level = __ffs(pending); > + handle_nested_irq(level + chip->irq_base); > + > + pending &= ~(1 << level); > + } while (pending); > + > + return IRQ_HANDLED; > +}
| |