watchdog: s3c2410_wdt - Add extra option to include watchdog for Samsung SoCs
[safe/jmp/linux-2.6] / drivers / serial / 8250.c
index c3db16b..891e1dd 100644 (file)
@@ -38,6 +38,7 @@
 #include <linux/serial_8250.h>
 #include <linux/nmi.h>
 #include <linux/mutex.h>
+#include <linux/slab.h>
 
 #include <asm/io.h>
 #include <asm/irq.h>
@@ -1890,8 +1891,8 @@ static int serial8250_get_poll_char(struct uart_port *port)
        struct uart_8250_port *up = (struct uart_8250_port *)port;
        unsigned char lsr = serial_inp(up, UART_LSR);
 
-       while (!(lsr & UART_LSR_DR))
-               lsr = serial_inp(up, UART_LSR);
+       if (!(lsr & UART_LSR_DR))
+               return NO_POLL_CHAR;
 
        return serial_inp(up, UART_RX);
 }