From: Andrew Victor Date: Tue, 9 Jan 2007 12:20:54 +0000 (+0100) Subject: [ARM] 4088/1: AT91: Unbalanced IRQ in serial driver suspend/resume X-Git-Tag: v2.6.20-rc7~31^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b938166907558e664d8fa413e6233a36669e0c0;p=linux-2.6 [ARM] 4088/1: AT91: Unbalanced IRQ in serial driver suspend/resume This patch fixes the unbalanced calls to enable_irq_wake() and disable_irq_wake() in the AT91 (and AVR32) serial driver. It should resolve these kernel messages: Unbalanced IRQ x wake disable BUG: warning at kernel/irq/manage.c:167/set_irq_wake() Original patch from Marc Pignat. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- diff --git a/drivers/serial/atmel_serial.c b/drivers/serial/atmel_serial.c index 1f9222c2e6..881f886b91 100644 --- a/drivers/serial/atmel_serial.c +++ b/drivers/serial/atmel_serial.c @@ -890,7 +890,6 @@ static int atmel_serial_suspend(struct platform_device *pdev, pm_message_t state if (device_may_wakeup(&pdev->dev) && !at91_suspend_entering_slow_clock()) enable_irq_wake(port->irq); else { - disable_irq_wake(port->irq); uart_suspend_port(&atmel_uart, port); atmel_port->suspended = 1; } @@ -907,6 +906,8 @@ static int atmel_serial_resume(struct platform_device *pdev) uart_resume_port(&atmel_uart, port); atmel_port->suspended = 0; } + else + disable_irq_wake(port->irq); return 0; }