i2c: mxs: : use proper DMAENGINE API for termination
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Wed, 23 Jun 2021 09:59:37 +0000 (11:59 +0200)
committerWolfram Sang <wsa@kernel.org>
Wed, 11 Aug 2021 13:16:01 +0000 (15:16 +0200)
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@sang-engineering.com>
Signed-off-by: Wolfram Sang <wsa@kernel.org>
drivers/i2c/busses/i2c-mxs.c

index f97243f022311e8c486a85387a9286362606aef0..864a3f1bd4e14e670e1c7a267354df8c7bc2e79a 100644 (file)
@@ -290,14 +290,14 @@ read_init_dma_fail:
 select_init_dma_fail:
        dma_unmap_sg(i2c->dev, &i2c->sg_io[0], 1, DMA_TO_DEVICE);
 select_init_pio_fail:
-       dmaengine_terminate_all(i2c->dmach);
+       dmaengine_terminate_sync(i2c->dmach);
        return -EINVAL;
 
 /* Write failpath. */
 write_init_dma_fail:
        dma_unmap_sg(i2c->dev, i2c->sg_io, 2, DMA_TO_DEVICE);
 write_init_pio_fail:
-       dmaengine_terminate_all(i2c->dmach);
+       dmaengine_terminate_sync(i2c->dmach);
        return -EINVAL;
 }