summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/mxser.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/tty/mxser.c b/drivers/tty/mxser.c
index 54b9a9c7c9e9..5dd121450813 100644
--- a/drivers/tty/mxser.c
+++ b/drivers/tty/mxser.c
@@ -1162,13 +1162,13 @@ static int mxser_tiocmget(struct tty_struct *tty)
if (tty_io_error(tty))
return -EIO;
- control = info->MCR;
-
spin_lock_irqsave(&info->slock, flags);
+ control = info->MCR;
status = inb(info->ioaddr + UART_MSR);
if (status & UART_MSR_ANY_DELTA)
mxser_check_modem_status(tty, info, status);
spin_unlock_irqrestore(&info->slock, flags);
+
return ((control & UART_MCR_RTS) ? TIOCM_RTS : 0) |
((control & UART_MCR_DTR) ? TIOCM_DTR : 0) |
((status & UART_MSR_DCD) ? TIOCM_CAR : 0) |