diff options
Diffstat (limited to 'drivers/serial/serial_pxa.c')
-rw-r--r-- | drivers/serial/serial_pxa.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/serial/serial_pxa.c b/drivers/serial/serial_pxa.c index 8fbcc10248..1eb19ececd 100644 --- a/drivers/serial/serial_pxa.c +++ b/drivers/serial/serial_pxa.c @@ -156,6 +156,10 @@ void pxa_putc_dev(unsigned int uart_index, const char c) { struct pxa_uart_regs *uart_regs; + /* If \n, also do \r */ + if (c == '\n') + pxa_putc_dev(uart_index, '\r'); + uart_regs = pxa_uart_index_to_regs(uart_index); if (!uart_regs) hang(); @@ -163,10 +167,6 @@ void pxa_putc_dev(unsigned int uart_index, const char c) while (!(readl(&uart_regs->lsr) & LSR_TEMT)) WATCHDOG_RESET(); writel(c, &uart_regs->thr); - - /* If \n, also do \r */ - if (c == '\n') - pxa_putc_dev (uart_index,'\r'); } /* |