Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <u.kleine-koenig@pengutronix.de>
Reviewed-by: Shawn Guo <shawnguo@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>

authored by

Uwe Kleine-König and committed by
Greg Kroah-Hartman
42afa627 4238c00b

+1 -1
+1 -1
drivers/tty/serial/imx.c
··· 1257 1257 writel(USR1_RTSD | USR1_DTRD, sport->port.membase + USR1); 1258 1258 writel(USR2_ORE, sport->port.membase + USR2); 1259 1259 1260 - if (dma_is_inited && !sport->dma_is_enabled) 1260 + if (dma_is_inited) 1261 1261 imx_enable_dma(sport); 1262 1262 1263 1263 temp = readl(sport->port.membase + UCR1) & ~UCR1_RRDYEN;