From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Date: Sun, 13 Jul 2014 22:52:12 +0000 (-0700)
Subject: Merge 3.16-rc5 into tty-next.
X-Git-Tag: firefly_0821_release~176^2~3490^2~27
X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=ca17749259d26f7ddbb0678790d5d534018d0a6b;p=firefly-linux-kernel-4.4.55.git

Merge 3.16-rc5 into tty-next.

We want those fixes in here as well.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---

ca17749259d26f7ddbb0678790d5d534018d0a6b
diff --cc drivers/tty/serial/arc_uart.c
index f8dc7d381956,008c223eaf26..a59d1d77e750
--- a/drivers/tty/serial/arc_uart.c
+++ b/drivers/tty/serial/arc_uart.c
@@@ -166,18 -172,18 +166,18 @@@ static void arc_serial_tx_chars(struct 
  	int sent = 0;
  	unsigned char ch;
  
 -	if (unlikely(uart->port.x_char)) {
 -		UART_SET_DATA(uart, uart->port.x_char);
 -		uart->port.icount.tx++;
 -		uart->port.x_char = 0;
 +	if (unlikely(port->x_char)) {
 +		UART_SET_DATA(port, port->x_char);
 +		port->icount.tx++;
 +		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++;
 -		while (!(UART_GET_STATUS(uart) & TXEMPTY))
 +		port->icount.tx++;
 +		while (!(UART_GET_STATUS(port) & TXEMPTY))
  			cpu_relax();
 -		UART_SET_DATA(uart, ch);
 +		UART_SET_DATA(port, ch);
  		sent = 1;
  	}