提交 638341d5 编写于 作者: F Fugang Duan 提交者: Greg Kroah-Hartman

tty: serial: fsl_lpuart: remove sg_set_buf() for sport->rx_sgl

Since .sg_init_one() already set sg entry page like below code.
	sg_init_one()
		sg_init_table(sg, 1);
		sg_set_buf(sg, buf, buflen);

So it should not set sg entry page again, remove the redundant code.
Signed-off-by: NFugang Duan <fugang.duan@nxp.com>
Link: https://lore.kernel.org/r/20190717051930.15514-5-fugang.duan@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
上级 ca8d92f6
......@@ -1102,7 +1102,6 @@ static inline int lpuart_start_rx_dma(struct lpuart_port *sport)
return -ENOMEM;
sg_init_one(&sport->rx_sgl, ring->buf, sport->rx_dma_rng_buf_len);
sg_set_buf(&sport->rx_sgl, ring->buf, sport->rx_dma_rng_buf_len);
nent = dma_map_sg(sport->port.dev, &sport->rx_sgl, 1, DMA_FROM_DEVICE);
if (!nent) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册