• Uwe Kleine-König's avatar
    serial: imx: simplify some conditions related to dma · 686351f3
    Uwe Kleine-König authored
    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: default avatarUwe Kleine-König <u.kleine-koenig@pengutronix.de>
    Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
    686351f3
imx.c 64 KB