summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/atmel_serial.c
diff options
context:
space:
mode:
authorPeter Hurley <peter@hurleysoftware.com>2014-11-05 21:11:44 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-07 01:57:27 +0300
commitd41510ce2f071c9ccb1903d7a5135443a57dbe4e (patch)
tree95982bb680036f763edb530bce025f77b0d344f8 /drivers/tty/serial/atmel_serial.c
parent732a84a037a4de29b54e0b4e6cb6f9b3813e29e5 (diff)
downloadlinux-d41510ce2f071c9ccb1903d7a5135443a57dbe4e.tar.xz
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/atmel_serial.c')
-rw-r--r--drivers/tty/serial/atmel_serial.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 6a1d960e2e82..e67cb3831280 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -2060,7 +2060,9 @@ static void atmel_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);
atmel_enable_ms(port);
+ spin_unlock_irq(&port->lock);
} else {
port->flags &= ~UPF_HARDPPS_CD;
}