lkml.org 
[lkml]   [2010]   [Mar]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [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;
> +}


\
 
 \ /
  Last update: 2010-03-20 00:45    [W:0.063 / U:34.228 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site