From: David Brownell Date: Tue, 21 Oct 2008 22:34:23 +0000 (+0100) Subject: [ARM] 5316/1: AT91: oops (regression) fix on gpio irq X-Git-Tag: v2.6.28-rc1~7^2~4 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=085eefb5948bb43020792f31406da2ee2ef4e924;p=linux-2.6-omap-h63xx.git [ARM] 5316/1: AT91: oops (regression) fix on gpio irq From: David Brownell The "5298/1: Drop desc_handle_irq()" patch went overboard and deleted an essential line of code, causing all AT91 GPIO interrupts to oops (in irq). Trimmed example: Unable to handle kernel NULL pointer dereference at virtual address 000000c4 ... PC is at gpio_irq_handler+0x78/0xd0 LR is at gpio_irq_handler+0x38/0xd0 ... Backtrace: [] (gpio_irq_handler+0x0/0xd0) from [] (__exception_text_start+0x54/0x7c) [] (__exception_text_start+0x0/0x7c) from [] (__irq_svc+0x2c/0x60) Exception stack(0xc1c1de00 to 0xc1c1de48) [] (_spin_unlock_irq+0x0/0x3c) from [] (at91ether_open+0x220/0x318) [] (at91ether_open+0x0/0x318) from [] (dev_open+0xa8/0x10c) [] (dev_open+0x0/0x10c) from [] (dev_change_flags+0x98/0x164) [] (dev_change_flags+0x0/0x164) from [] (ip_auto_config+0x164/0xe28) [] (ip_auto_config+0x0/0xe28) from [] (__exception_text_end+0x60/0x180) [] (__exception_text_end+0x0/0x180) from [] (kernel_init+0x70/0xd8) [] (kernel_init+0x0/0xd8) from [] (do_exit+0x0/0x6ac) This patch restores the missing line'o'code. Signed-off-by: David Brownell Acked-by: Andrew Victor Signed-off-by: Russell King --- diff --git a/arch/arm/mach-at91/gpio.c b/arch/arm/mach-at91/gpio.c index 7e5ebb5bdd1..9b0447c3d59 100644 --- a/arch/arm/mach-at91/gpio.c +++ b/arch/arm/mach-at91/gpio.c @@ -404,6 +404,7 @@ static void gpio_irq_handler(unsigned irq, struct irq_desc *desc) } pin = bank->chipbase; + gpio = &irq_desc[pin]; while (isr) { if (isr & 1) {