Fix logic of tx_empty.
PATCH 1/1 Fix logic of tx_empty.
test for TX-FIFO *not empty* instead of TX-FIFO full.
Signed-off-by Simon Budig <[email protected]>
--- drivers/tty/serial/amba-pl011.c | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-)
drivers/tty/serial/amba-pl011.c +1 -1
@@ -792,7 +792,7 @@ static unsigned int pl01x_tx_empty(struct uart_port *port) {struct uart_amba_port *uap = (struct uart_amba_port *)port;unsigned int status =readw (uap->port.membase + UART01x_FR); -return status & (UART01x_FR_BUSY|UART01x_FR_TXFF) ?0 :TIOCSER_TEMT ; +return (status & UART01x_FR_BUSY) || !(status &UART011_FR_TXFE ) ?0 :TIOCSER_TEMT ; }static unsigned int pl01x_get_mctrl (struct uart_port *port)
Signature · 5 lines
1.7.0.4 --------------060708010803060308030706--