]> git.baikalelectronics.ru Git - kernel.git/commitdiff
serial: arc_uart: Use uart_circ_empty() for open-coded comparison
authorPeter Hurley <peter@hurleysoftware.com>
Sun, 6 Jul 2014 15:29:53 +0000 (11:29 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Thu, 10 Jul 2014 23:31:34 +0000 (16:31 -0700)
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>
drivers/tty/serial/arc_uart.c

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