serial: imx: simplify some conditions related to dma
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Fri, 2 Mar 2018 10:07:21 +0000 (11:07 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 9 Mar 2018 18:21:01 +0000 (10:21 -0800)
commit686351f342fa745d10ddef08d0e930cf53b0c673
treee5684acf2eb9411d4b7d529d5a9a083da6cc2f89
parent3a0ab62f43de5c6ec55fb9d6721168602008142a
serial: imx: simplify some conditions related to dma

Neither .dma_is_txing nor .dma_is_rxing can evaluate to true if
.dma_is_enabled evaluates to false:

The only function that sets .dma_is_txing to a non-zero value is
imx_dma_tx() which is only called if .dma_is_enabled is true. Same for
.dma_is_rxing and start_rx_dma(). And before .dma_is_enabled is set to 0
when imx_shutdown calls imx_disable_dma(), .dma_is_rxing and
.dma_is_txing are reset to zero before, too.

For this reason

sport->dma_is_enabled && sport->dma_is_rxing

has the same value as

sport->dma_is_rxing

which allows to simplify three if conditions.

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