]> asedeno.scripts.mit.edu Git - linux.git/commit
serial: imx: simplify tracking of dma being initialized
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Sun, 18 Feb 2018 21:02:45 +0000 (22:02 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 28 Feb 2018 14:29:59 +0000 (15:29 +0100)
commit4238c00bb154be840c11540a81c5e99faa06a631
tree2db749fed2e7ee6bb7638d3395bda7eac785a79f
parent437768962f754d9501e5ba4d98b1f2a89dc62028
serial: imx: simplify tracking of dma being initialized

The .dma_is_inited member is only set to a value != 0 when the port's
startup function calls imx_uart_dma_init(). On shutdown of the port
imx_uart_dma_exit is called which sets the value back to 0. So
.dma_is_inited is always 0 when imx_startup() is called (assuming
.startup() and .shutdown() are correctly balanced) and the check for
!sport->dma_is_inited can go away.

This allows to replace .dma_is_inited by a variable local to
imx_startup.

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