From: Samuel Date: Tue, 28 Aug 2007 18:56:34 +0000 (+0100) Subject: [ARM] 4557/1: Fix PXA irq gpio initialization X-Git-Tag: v2.6.23-rc5~41^2~1 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fd51bcc5dc4073b18308f25846aa3b421fa3c42e;p=linux-2.6 [ARM] 4557/1: Fix PXA irq gpio initialization As pointed out by Jrgen, we are overflowing the number of GPIOs in pxa_init_irq_gpio(). I'm seeing the same problem on my HTC Universal PXA270 based PDA. According to Eric, the function argument is the number of GPIOs, so we should keep the semantics and reduce the number of iteration by 1. Signed-off-by: Samuel Ortiz Acked-by: Jrgen Schindele Signed-off-by: Russell King --- diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c index 4b867b0789..ae2ae08032 100644 --- a/arch/arm/mach-pxa/irq.c +++ b/arch/arm/mach-pxa/irq.c @@ -365,7 +365,7 @@ void __init pxa_init_irq_gpio(int gpio_nr) set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); } - for (irq = IRQ_GPIO(2); irq <= IRQ_GPIO(gpio_nr); irq++) { + for (irq = IRQ_GPIO(2); irq < IRQ_GPIO(gpio_nr); irq++) { set_irq_chip(irq, &pxa_muxed_gpio_chip); set_irq_handler(irq, handle_edge_irq); set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);