serial/mxs-auart: only wake up tty layer once
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 22 Nov 2011 13:22:56 +0000 (14:22 +0100)
committerGreg Kroah-Hartman <gregkh@suse.de>
Sun, 27 Nov 2011 04:10:13 +0000 (20:10 -0800)
There is no need to call uart_write_wakeup after each character send.
Once at the end of the write sequence is enough.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Acked-by: Alan Cox <alan@linux.intel.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/tty/serial/mxs-auart.c

index 7e02c9c344fee3496814ebc8b55bbe21280f618b..076169f50b010e31716f1a8467acc1cf79ad7a12 100644 (file)
@@ -145,11 +145,12 @@ static inline void mxs_auart_tx_chars(struct mxs_auart_port *s)
                        writel(xmit->buf[xmit->tail],
                                     s->port.membase + AUART_DATA);
                        xmit->tail = (xmit->tail + 1) & (UART_XMIT_SIZE - 1);
-                       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
-                               uart_write_wakeup(&s->port);
                } else
                        break;
        }
+       if (uart_circ_chars_pending(xmit) < WAKEUP_CHARS)
+               uart_write_wakeup(&s->port);
+
        if (uart_circ_empty(&(s->port.state->xmit)))
                writel(AUART_INTR_TXIEN,
                             s->port.membase + AUART_INTR_CLR);