diff options
Diffstat (limited to 'drivers/tty/serial/m32r_sio.c')
-rw-r--r-- | drivers/tty/serial/m32r_sio.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/drivers/tty/serial/m32r_sio.c b/drivers/tty/serial/m32r_sio.c index 68f2c53e0b54..5702828fb62e 100644 --- a/drivers/tty/serial/m32r_sio.c +++ b/drivers/tty/serial/m32r_sio.c | |||
@@ -266,9 +266,11 @@ static void m32r_sio_start_tx(struct uart_port *port) | |||
266 | if (!(up->ier & UART_IER_THRI)) { | 266 | if (!(up->ier & UART_IER_THRI)) { |
267 | up->ier |= UART_IER_THRI; | 267 | up->ier |= UART_IER_THRI; |
268 | serial_out(up, UART_IER, up->ier); | 268 | serial_out(up, UART_IER, up->ier); |
269 | serial_out(up, UART_TX, xmit->buf[xmit->tail]); | 269 | if (!uart_circ_empty(xmit)) { |
270 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); | 270 | serial_out(up, UART_TX, xmit->buf[xmit->tail]); |
271 | up->port.icount.tx++; | 271 | xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1); |
272 | up->port.icount.tx++; | ||
273 | } | ||
272 | } | 274 | } |
273 | while((serial_in(up, UART_LSR) & UART_EMPTY) != UART_EMPTY); | 275 | while((serial_in(up, UART_LSR) & UART_EMPTY) != UART_EMPTY); |
274 | #else | 276 | #else |