提交 0c549223 编写于 作者: U Uwe Kleine-König 提交者: Greg Kroah-Hartman

serial: imx: simplify check that prevents starting PIO when DMA is in use

The original code looks as follows:

	if (sport->dma_is_enabled) {
		... make sure TX DMA is running, i.e. .dma_is_txing = 1
	}

	if (sport->dma_is_txing)
		return;

As .dma_is_txing can only be true if .dma_is_enabled is, the return can
go at the end of the first if body without an additional check.
Signed-off-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 686351f3
......@@ -504,10 +504,9 @@ static inline void imx_transmit_buffer(struct imx_port *sport)
imx_uart_writel(sport, temp, UCR1);
imx_dma_tx(sport);
}
}
if (sport->dma_is_txing)
return;
}
while (!uart_circ_empty(xmit) &&
!(imx_uart_readl(sport, uts_reg(sport)) & UTS_TXFULL)) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册