OSDN Git Service

serial: imx: drop check for enabled dma in .startup
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 18 Feb 2018 21:02:46 +0000 (22:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Feb 2018 14:29:59 +0000 (15:29 +0100)
imx_shutdown() calls imx_disable_dma if .dma_is_enabled. So after
imx_shudown() completes, .dma_is_enabled is zero. For this reason
.dma_is_enabled is also zero when imx_startup() is called. So the check
for this variable being zero can be dropped.

Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Reviewed-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c

index c60ce00..689a117 100644 (file)
@@ -1257,7 +1257,7 @@ static int imx_startup(struct uart_port *port)
        writel(USR1_RTSD | USR1_DTRD, sport->port.membase + USR1);
        writel(USR2_ORE, sport->port.membase + USR2);
 
-       if (dma_is_inited && !sport->dma_is_enabled)
+       if (dma_is_inited)
                imx_enable_dma(sport);
 
        temp = readl(sport->port.membase + UCR1) & ~UCR1_RRDYEN;