diff options
Diffstat (limited to 'drivers/tty/serial/pxa.c')
-rw-r--r-- | drivers/tty/serial/pxa.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/tty/serial/pxa.c b/drivers/tty/serial/pxa.c index 21b7d8b8649..7788d53281a 100644 --- a/drivers/tty/serial/pxa.c +++ b/drivers/tty/serial/pxa.c @@ -223,6 +223,7 @@ static void serial_pxa_start_tx(struct uart_port *port) } } +/* should hold up->port.lock */ static inline void check_modem_status(struct uart_pxa_port *up) { int status; @@ -255,12 +256,14 @@ static inline irqreturn_t serial_pxa_irq(int irq, void *dev_id) iir = serial_in(up, UART_IIR); if (iir & UART_IIR_NO_INT) return IRQ_NONE; + spin_lock(&up->port.lock); lsr = serial_in(up, UART_LSR); if (lsr & UART_LSR_DR) receive_chars(up, &lsr); check_modem_status(up); if (lsr & UART_LSR_THRE) transmit_chars(up); + spin_unlock(&up->port.lock); return IRQ_HANDLED; } |