From: Uwe Kleine-König Date: Sun, 18 Feb 2018 21:02:46 +0000 (+0100) Subject: serial: imx: drop check for enabled dma in .startup X-Git-Tag: v4.17-rc1~125^2~47 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=42afa627c338e22bbde06c95bd7b46f960c91f79;p=uclinux-h8%2Flinux.git serial: imx: drop check for enabled dma in .startup 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 Reviewed-by: Shawn Guo Signed-off-by: Greg Kroah-Hartman --- diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c index c60ce00e701c..689a117943a0 100644 --- a/drivers/tty/serial/imx.c +++ b/drivers/tty/serial/imx.c @@ -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;