atmel_serial: fix interrupt handler return value
authorHaavard Skinnemoen <hskinnemoen@atmel.com>
Sat, 23 Feb 2008 23:23:36 +0000 (15:23 -0800)
committerLinus Torvalds <torvalds@woody.linux-foundation.org>
Sun, 24 Feb 2008 01:12:14 +0000 (17:12 -0800)
We should only return IRQ_HANDLED when we actually found something to
handle. This is important since the USART interrupt handler may be
shared with the timer interrupt on some chips.

Pointed-out-by: michael <trimarchi@gandalf.sssup.it>
Signed-off-by: Haavard Skinnemoen <hskinnemoen@atmel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
drivers/serial/atmel_serial.c

index fad245b064d666a00017aabcc8f6ccb9b4f08a91..d57bf3e708d8fffb187dcbe33e410811cdeb1f66 100644 (file)
@@ -549,7 +549,7 @@ static irqreturn_t atmel_interrupt(int irq, void *dev_id)
                atmel_handle_transmit(port, pending);
        } while (pass_counter++ < ATMEL_ISR_PASS_LIMIT);
 
-       return IRQ_HANDLED;
+       return pass_counter ? IRQ_HANDLED : IRQ_NONE;
 }
 
 /*