Browse Source

serial: arc_uart: Use uart_circ_empty() for open-coded comparison

Replace open-coded test for empty tx ring buffer with equivalent
helper function, uart_circ_empty(). No functional change.

Signed-off-by: Peter Hurley <peter@hurleysoftware.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley 11 years ago
parent
commit
99ecb001f5
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/tty/serial/arc_uart.c

+ 1 - 1
drivers/tty/serial/arc_uart.c

@@ -177,7 +177,7 @@ static void arc_serial_tx_chars(struct arc_uart_port *uart)
 		uart->port.icount.tx++;
 		uart->port.icount.tx++;
 		uart->port.x_char = 0;
 		uart->port.x_char = 0;
 		sent = 1;
 		sent = 1;
-	} else if (xmit->tail != xmit->head) {	/* TODO: uart_circ_empty */
+	} else if (!uart_circ_empty(xmit)) {
 		ch = xmit->buf[xmit->tail];
 		ch = xmit->buf[xmit->tail];
 		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
 		xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
 		uart->port.icount.tx++;
 		uart->port.icount.tx++;