[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20210625120601.vmwn4ct7mrnusijb@pengutronix.de>
Date: Fri, 25 Jun 2021 14:06:01 +0200
From: Oleksij Rempel <o.rempel@...gutronix.de>
To: Wolfram Sang <wsa+renesas@...g-engineering.com>
Cc: linux-mmc@...r.kernel.org, linux-renesas-soc@...r.kernel.org,
Oleksij Rempel <linux@...pel-privat.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
NXP Linux Team <linux-imx@....com>,
linux-i2c@...r.kernel.org, linux-arm-kernel@...ts.infradead.org,
linux-kernel@...r.kernel.org
Subject: Re: [PATCH 2/7] i2c: imx: : use proper DMAENGINE API for termination
Hello Wolfram,
On Wed, Jun 23, 2021 at 11:59:36AM +0200, Wolfram Sang wrote:
> dmaengine_terminate_all() is deprecated in favor of explicitly saying if
> it should be sync or async. Here, we want dmaengine_terminate_sync()
> because there is no other synchronization code in the driver to handle
> an async case.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@...g-engineering.com>
Reviewed-by: Oleksij Rempel <o.rempel@...gutronix.de
Thank you!
> ---
> drivers/i2c/busses/i2c-imx.c | 6 +++---
> 1 file changed, 3 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/i2c/busses/i2c-imx.c b/drivers/i2c/busses/i2c-imx.c
> index dc5ca71906db..b224e82924d2 100644
> --- a/drivers/i2c/busses/i2c-imx.c
> +++ b/drivers/i2c/busses/i2c-imx.c
> @@ -423,7 +423,7 @@ static int i2c_imx_dma_xfer(struct imx_i2c_struct *i2c_imx,
> return 0;
>
> err_submit:
> - dmaengine_terminate_all(dma->chan_using);
> + dmaengine_terminate_sync(dma->chan_using);
> err_desc:
> dma_unmap_single(chan_dev, dma->dma_buf,
> dma->dma_len, dma->dma_data_dir);
> @@ -899,7 +899,7 @@ static int i2c_imx_dma_write(struct imx_i2c_struct *i2c_imx,
> &i2c_imx->dma->cmd_complete,
> msecs_to_jiffies(DMA_TIMEOUT));
> if (time_left == 0) {
> - dmaengine_terminate_all(dma->chan_using);
> + dmaengine_terminate_sync(dma->chan_using);
> return -ETIMEDOUT;
> }
>
> @@ -954,7 +954,7 @@ static int i2c_imx_dma_read(struct imx_i2c_struct *i2c_imx,
> &i2c_imx->dma->cmd_complete,
> msecs_to_jiffies(DMA_TIMEOUT));
> if (time_left == 0) {
> - dmaengine_terminate_all(dma->chan_using);
> + dmaengine_terminate_sync(dma->chan_using);
> return -ETIMEDOUT;
> }
>
> --
> 2.30.2
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
Powered by blists - more mailing lists