diff options
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index af9b7814965..b989495c763 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c | |||
@@ -199,8 +199,9 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) | |||
199 | { | 199 | { |
200 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); | 200 | struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); |
201 | unsigned int mode; | 201 | unsigned int mode; |
202 | unsigned long flags; | ||
202 | 203 | ||
203 | spin_lock(&port->lock); | 204 | spin_lock_irqsave(&port->lock, flags); |
204 | 205 | ||
205 | /* Disable interrupts */ | 206 | /* Disable interrupts */ |
206 | UART_PUT_IDR(port, atmel_port->tx_done_mask); | 207 | UART_PUT_IDR(port, atmel_port->tx_done_mask); |
@@ -231,7 +232,7 @@ void atmel_config_rs485(struct uart_port *port, struct serial_rs485 *rs485conf) | |||
231 | /* Enable interrupts */ | 232 | /* Enable interrupts */ |
232 | UART_PUT_IER(port, atmel_port->tx_done_mask); | 233 | UART_PUT_IER(port, atmel_port->tx_done_mask); |
233 | 234 | ||
234 | spin_unlock(&port->lock); | 235 | spin_unlock_irqrestore(&port->lock, flags); |
235 | 236 | ||
236 | } | 237 | } |
237 | 238 | ||