diff options
Diffstat (limited to 'drivers/serial')
-rw-r--r-- | drivers/serial/8250.c | 4 | ||||
-rw-r--r-- | drivers/serial/amba-pl011.c | 6 |
2 files changed, 5 insertions, 5 deletions
diff --git a/drivers/serial/8250.c b/drivers/serial/8250.c index 2b1ea3d4c4f4..891e1dd65f24 100644 --- a/drivers/serial/8250.c +++ b/drivers/serial/8250.c | |||
@@ -1891,8 +1891,8 @@ static int serial8250_get_poll_char(struct uart_port *port) | |||
1891 | struct uart_8250_port *up = (struct uart_8250_port *)port; | 1891 | struct uart_8250_port *up = (struct uart_8250_port *)port; |
1892 | unsigned char lsr = serial_inp(up, UART_LSR); | 1892 | unsigned char lsr = serial_inp(up, UART_LSR); |
1893 | 1893 | ||
1894 | while (!(lsr & UART_LSR_DR)) | 1894 | if (!(lsr & UART_LSR_DR)) |
1895 | lsr = serial_inp(up, UART_LSR); | 1895 | return NO_POLL_CHAR; |
1896 | 1896 | ||
1897 | return serial_inp(up, UART_RX); | 1897 | return serial_inp(up, UART_RX); |
1898 | } | 1898 | } |
diff --git a/drivers/serial/amba-pl011.c b/drivers/serial/amba-pl011.c index 743ebf5f16da..eb4cb480b93e 100644 --- a/drivers/serial/amba-pl011.c +++ b/drivers/serial/amba-pl011.c | |||
@@ -342,9 +342,9 @@ static int pl010_get_poll_char(struct uart_port *port) | |||
342 | struct uart_amba_port *uap = (struct uart_amba_port *)port; | 342 | struct uart_amba_port *uap = (struct uart_amba_port *)port; |
343 | unsigned int status; | 343 | unsigned int status; |
344 | 344 | ||
345 | do { | 345 | status = readw(uap->port.membase + UART01x_FR); |
346 | status = readw(uap->port.membase + UART01x_FR); | 346 | if (status & UART01x_FR_RXFE) |
347 | } while (status & UART01x_FR_RXFE); | 347 | return NO_POLL_CHAR; |
348 | 348 | ||
349 | return readw(uap->port.membase + UART01x_DR); | 349 | return readw(uap->port.membase + UART01x_DR); |
350 | } | 350 | } |