aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--drivers/tty/serial/atmel_serial.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index bd85e32521d2..10605ecc99ab 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -212,8 +212,9 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
212{ 212{
213 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); 213 struct atmel_uart_port *atmel_port = to_atmel_uart_port(port);
214 unsigned int mode; 214 unsigned int mode;
215 unsigned long flags;
215 216
216 spin_lock(&port->lock); 217 spin_lock_irqsave(&port->lock, flags);
217 218
218 /* Disable interrupts */ 219 /* Disable interrupts */
219 UART_PUT_IDR(port, atmel_port->tx_done_mask); 220 UART_PUT_IDR(port, atmel_port->tx_done_mask);
@@ -244,7 +245,7 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf)
244 /* Enable interrupts */ 245 /* Enable interrupts */
245 UART_PUT_IER(port, atmel_port->tx_done_mask); 246 UART_PUT_IER(port, atmel_port->tx_done_mask);
246 247
247 spin_unlock(&port->lock); 248 spin_unlock_irqrestore(&port->lock, flags);
248 249
249} 250}
250 251