summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/uartlite.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/tty/serial/uartlite.c')
-rw-r--r--drivers/tty/serial/uartlite.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/drivers/tty/serial/uartlite.c b/drivers/tty/serial/uartlite.c
index c249aee887d2..ee2e8efdea4a 100644
--- a/drivers/tty/serial/uartlite.c
+++ b/drivers/tty/serial/uartlite.c
@@ -194,7 +194,9 @@ static irqreturn_t ulite_isr(int irq, void *dev_id)
{
struct uart_port *port = dev_id;
int busy, n = 0;
+ unsigned long flags;
+ spin_lock_irqsave(&port->lock, flags);
do {
int stat = uart_in32(ULITE_STATUS, port);
busy = ulite_receive(port, stat);
@@ -202,6 +204,8 @@ static irqreturn_t ulite_isr(int irq, void *dev_id)
n++;
} while (busy);
+ spin_unlock_irqrestore(&port->lock, flags);
+
/* work done? */
if (n > 1) {
tty_flip_buffer_push(&port->state->port);
OpenPOWER on IntegriCloud