[PATCH 3/3] arch: arm: mach-cns3xxx: Add external interrupt pin demo program

Russell King - ARM Linux linux at arm.linux.org.uk
Thu Jul 28 06:06:48 EDT 2011


On Fri, Jul 29, 2011 at 01:17:55AM +0800, Tommy Lin wrote:
> +#include <mach/gpio.h>

Need I mention it...
> +static irqreturn_t cns3xxx_ext_intr1_handler(int irq, void *dev_id)
> +{
> +	int value;
> +
> +	value = gpio_get_value(led_D6);
> +
> +	disable_irq_nosync(irq);
> +
> +	gpio_set_value(led_D6, !value);
> +
> +	enable_irq(irq);

Why do you need the disable_irq/enable_irq ?  The interrupt you're
dealing with will already be masked by the core genirq code.



More information about the linux-arm-kernel mailing list