aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/serial/serial_txx9.c
diff options
context:
space:
mode:
authorRussell King <rmk@dyn-67.arm.linux.org.uk>2005-06-29 04:42:38 -0400
committerRussell King <rmk+kernel@arm.linux.org.uk>2005-06-29 04:42:38 -0400
commitc5f4644e6c8ba21666128603e4e92544d3cd740d (patch)
tree1a8b4c730ca575d4b1118af174b070764803fb2c /drivers/serial/serial_txx9.c
parenta839688362e32f01608838516036697e30618b39 (diff)
[PATCH] Serial: Adjust serial locking
This patch changes the way serial ports are locked when getting modem status. This change is necessary because we will need to atomically read the modem status and take action depending on the CTS status. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'drivers/serial/serial_txx9.c')
-rw-r--r--drivers/serial/serial_txx9.c3
1 files changed, 0 insertions, 3 deletions
diff --git a/drivers/serial/serial_txx9.c b/drivers/serial/serial_txx9.c
index 3f1051a4a13f..d085030df70b 100644
--- a/drivers/serial/serial_txx9.c
+++ b/drivers/serial/serial_txx9.c
@@ -442,13 +442,10 @@ static unsigned int serial_txx9_tx_empty(struct uart_port *port)
442static unsigned int serial_txx9_get_mctrl(struct uart_port *port) 442static unsigned int serial_txx9_get_mctrl(struct uart_port *port)
443{ 443{
444 struct uart_txx9_port *up = (struct uart_txx9_port *)port; 444 struct uart_txx9_port *up = (struct uart_txx9_port *)port;
445 unsigned long flags;
446 unsigned int ret; 445 unsigned int ret;
447 446
448 spin_lock_irqsave(&up->port.lock, flags);
449 ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS) 447 ret = ((sio_in(up, TXX9_SIFLCR) & TXX9_SIFLCR_RTSSC) ? 0 : TIOCM_RTS)
450 | ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS); 448 | ((sio_in(up, TXX9_SICISR) & TXX9_SICISR_CTSS) ? 0 : TIOCM_CTS);
451 spin_unlock_irqrestore(&up->port.lock, flags);
452 449
453 return ret; 450 return ret;
454} 451}