serial: uartps: Move the spinlock after the read of the tx empty
authorShubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Fri, 24 May 2019 09:11:28 +0000 (14:41 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 14 Feb 2020 21:33:28 +0000 (16:33 -0500)
commit77bad0ab1b725e6c348277fcdb8790908286ca20
tree7c73b315a1af2c9c5da2cad432c09ebb1072eea5
parent2cdef3b47a404cb913efb192f280673da6f6e227
serial: uartps: Move the spinlock after the read of the tx empty

commit 107475685abfdee504bb0ef4824f15797f6d2d4d upstream.

Currently we are doing a read of the status register.
Move the spinlock after that as the reads need not be spinlock
protected. This patch prevents relaxing the cpu with spinlock held.

Signed-off-by: Shubhrajyoti Datta <shubhrajyoti.datta@xilinx.com>
Cc: Pavel Machek <pavel@denx.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/xilinx_uartps.c