summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/amba-pl010.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-11-05 13:11:44 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 14:57:27 -0800
commitd41510ce2f071c9ccb1903d7a5135443a57dbe4e (patch)
tree95982bb680036f763edb530bce025f77b0d344f8 /drivers/tty/serial/amba-pl010.c
parent732a84a037a4de29b54e0b4e6cb6f9b3813e29e5 (diff)
serial: Take uart port lock for direct *_enable_ms()
Three UART drivers (8250, atmel & amba-pl010) directly call their enable_ms() method; the uart port lock must be acquired before any h/w programming. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/amba-pl010.c')
-rw-r--r--drivers/tty/serial/amba-pl010.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/amba-pl010.c b/drivers/tty/serial/amba-pl010.c
index 230bc7a290d5..194108b0de84 100644
--- a/drivers/tty/serial/amba-pl010.c
+++ b/drivers/tty/serial/amba-pl010.c
@@ -483,7 +483,9 @@ static void pl010_set_ldisc(struct uart_port *port, struct ktermios *termios)
{
if (termios->c_line == N_PPS) {
port->flags |= UPF_HARDPPS_CD;
+ spin_lock_irq(&port->lock);
pl010_enable_ms(port);
+ spin_unlock_irq(&port->lock);
} else
port->flags &= ~UPF_HARDPPS_CD;
}