diff options
author | Fugang Duan <fugang.duan@nxp.com> | 2017-12-08 16:12:50 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | 6c56e89a9aa783d7f101a0906b71915bae63a359 (patch) | |
tree | 77c8acf19f89048c3f68b91b7906695f8c754559 /drivers/tty/serial | |
parent | a9de0baa334c773df3a2eb9740e1a4cdb4dae0c0 (diff) |
MLK-17133-03 tty: serial: lpuart: directly terminate rx dma chans in .shutdown()
No need to wait dma_wait event, directly terminate rx dma chans
in .shutdown() callback.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Robin Gong <yibin.gong@nxp.com>
Reviewed-by: Robin Gong <yibin.gong@nxp.com>
Diffstat (limited to 'drivers/tty/serial')
-rw-r--r-- | drivers/tty/serial/fsl_lpuart.c | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index bc84ade99748..2828dc4cf6ef 100644 --- a/drivers/tty/serial/fsl_lpuart.c +++ b/drivers/tty/serial/fsl_lpuart.c @@ -1422,12 +1422,8 @@ static void lpuart_shutdown(struct uart_port *port) spin_unlock_irqrestore(&port->lock, flags); if (sport->lpuart_dma_rx_use) { - ret = wait_event_interruptible_timeout(sport->dma_wait, - !sport->dma_rx_in_progress, msecs_to_jiffies(1)); - if (ret <= 0) { - sport->dma_rx_in_progress = false; - dmaengine_terminate_all(sport->dma_rx_chan); - } + sport->dma_rx_in_progress = false; + dmaengine_terminate_all(sport->dma_rx_chan); del_timer_sync(&sport->lpuart_timer); lpuart_dma_rx_free(&sport->port); } @@ -1471,12 +1467,8 @@ static void lpuart32_shutdown(struct uart_port *port) spin_unlock_irqrestore(&port->lock, flags); if (sport->lpuart_dma_rx_use) { - ret = wait_event_interruptible_timeout(sport->dma_wait, - !sport->dma_rx_in_progress, msecs_to_jiffies(1)); - if (ret <= 0) { - sport->dma_rx_in_progress = false; - dmaengine_terminate_all(sport->dma_rx_chan); - } + sport->dma_rx_in_progress = false; + dmaengine_terminate_all(sport->dma_rx_chan); if (!sport->dma_eeop) del_timer_sync(&sport->lpuart_timer); lpuart_dma_rx_free(&sport->port); |