diff options
Diffstat (limited to 'drivers/tty/serial/mps2-uart.c')
| -rw-r--r-- | drivers/tty/serial/mps2-uart.c | 26 | 
1 files changed, 4 insertions, 22 deletions
diff --git a/drivers/tty/serial/mps2-uart.c b/drivers/tty/serial/mps2-uart.c index 2e3e6cf16817..860d161fa594 100644 --- a/drivers/tty/serial/mps2-uart.c +++ b/drivers/tty/serial/mps2-uart.c @@ -129,29 +129,11 @@ static void mps2_uart_stop_tx(struct uart_port *port)  static void mps2_uart_tx_chars(struct uart_port *port)  { -	struct circ_buf *xmit = &port->state->xmit; - -	while (!(mps2_uart_read8(port, UARTn_STATE) & UARTn_STATE_TX_FULL)) { -		if (port->x_char) { -			mps2_uart_write8(port, port->x_char, UARTn_DATA); -			port->x_char = 0; -			port->icount.tx++; -			continue; -		} - -		if (uart_circ_empty(xmit) || uart_tx_stopped(port)) -			break; - -		mps2_uart_write8(port, xmit->buf[xmit->tail], UARTn_DATA); -		xmit->tail = (xmit->tail + 1) % UART_XMIT_SIZE; -		port->icount.tx++; -	} - -	if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS) -		uart_write_wakeup(port); +	u8 ch; -	if (uart_circ_empty(xmit)) -		mps2_uart_stop_tx(port); +	uart_port_tx(port, ch, +		mps2_uart_tx_empty(port), +		mps2_uart_write8(port, ch, UARTn_DATA));  }  static void mps2_uart_start_tx(struct uart_port *port)  |