Re: [PATCH] gpio: add interrupt handling capability to max732x

From: Marc Zyngier
Date: Mon Mar 22 2010 - 03:40:40 EST


On Fri, 19 Mar 2010 16:41:56 -0700
Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> wrote:

> On Tue, 16 Mar 2010 11:34:52 +0100
> Marc Zyngier <maz@xxxxxxxxxxxxxxx> 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.

Hi Andrew,

Would the following patch (against the original version) address your
concerns?

Thanks,

M.