]> git.baikalelectronics.ru Git - kernel.git/commit
tty: xuartps: Fix tx_emtpy() callback
authorLars-Peter Clausen <lars@metafoo.de>
Fri, 5 Sep 2014 07:45:17 +0000 (09:45 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 8 Sep 2014 23:33:56 +0000 (16:33 -0700)
commitec34903413a0cb16db6a6d58485964ac78a0d2c1
treeace8788d67beca64d10e28b4fbb72e55f09afbc0
parent135701ca6256e69b1d81e67b0042024516396042
tty: xuartps: Fix tx_emtpy() callback

The tx_empty() callback currently checks the TXEMPTY bit in the interrupt
status register to decided whether the FIFO should be reported as empty or
not. The bit in this register gets set when the FIFO state transitions from
non-empty to empty but is cleared again in the interrupt handler. This means
it is not suitable to be used to decided whether the FIFO is currently empty
or not. Instead use the TXEMPTY bit from the status register which will be
set as long as the FIFO is empty.

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Soren Brinkmann <soren.brinkmann@xilinx.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c