From: Jaikumar Ganesh Date: Tue, 14 Dec 2010 22:56:59 +0000 (-0800) Subject: serial: tegra_hsuart: Call rx_done callback with lock held. X-Git-Tag: firefly_0821_release~9834^2~243 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=f45ad45201f7446d1138fc425947dce300f47131;p=firefly-linux-kernel-4.4.55.git 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 --- 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 */