From f45ad45201f7446d1138fc425947dce300f47131 Mon Sep 17 00:00:00 2001 From: Jaikumar Ganesh Date: Tue, 14 Dec 2010 14:56:59 -0800 Subject: [PATCH] serial: tegra_hsuart: Call rx_done callback with lock held. Similar to the exit_lpm callback which is called with the lock held, call the rx_done callback with lock held. Change-Id: I307d5191669ef6816d8406bb421b2c10c902f6a8 Signed-off-by: Jaikumar Ganesh --- drivers/serial/tegra_hsuart.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/serial/tegra_hsuart.c b/drivers/serial/tegra_hsuart.c index b0d1b8de8712..54d9fa6e0bf5 100644 --- a/drivers/serial/tegra_hsuart.c +++ b/drivers/serial/tegra_hsuart.c @@ -312,9 +312,9 @@ static void tegra_rx_dma_complete_callback(struct tegra_dma_req *req) spin_unlock(&u->lock); tty_flip_buffer_push(u->state->port.tty); + spin_lock(&u->lock); if (t->rx_done_cb) t->rx_done_cb(u); - spin_lock(&u->lock); } /* Lock already taken */ @@ -532,9 +532,9 @@ static irqreturn_t tegra_uart_isr(int irq, void *data) spin_unlock_irqrestore(&u->lock, flags); tty_flip_buffer_push(u->state->port.tty); + spin_lock_irqsave(&u->lock, flags); if (t->rx_done_cb) t->rx_done_cb(u); - spin_lock_irqsave(&u->lock, flags); } break; case 3: /* Receive error */ -- 2.34.1