Commit 29176edd authored by Wolfram Sang's avatar Wolfram Sang Committed by Mark Brown

spi: spi-rspi: : use proper DMAENGINE API for termination

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210623095843.3228-2-wsa+renesas@sang-engineering.comSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent d90609a4
...@@ -618,9 +618,9 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, ...@@ -618,9 +618,9 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
ret = -ETIMEDOUT; ret = -ETIMEDOUT;
} }
if (tx) if (tx)
dmaengine_terminate_all(rspi->ctlr->dma_tx); dmaengine_terminate_sync(rspi->ctlr->dma_tx);
if (rx) if (rx)
dmaengine_terminate_all(rspi->ctlr->dma_rx); dmaengine_terminate_sync(rspi->ctlr->dma_rx);
} }
rspi_disable_irq(rspi, irq_mask); rspi_disable_irq(rspi, irq_mask);
...@@ -634,7 +634,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx, ...@@ -634,7 +634,7 @@ static int rspi_dma_transfer(struct rspi_data *rspi, struct sg_table *tx,
no_dma_tx: no_dma_tx:
if (rx) if (rx)
dmaengine_terminate_all(rspi->ctlr->dma_rx); dmaengine_terminate_sync(rspi->ctlr->dma_rx);
no_dma_rx: no_dma_rx:
if (ret == -EAGAIN) { if (ret == -EAGAIN) {
dev_warn_once(&rspi->ctlr->dev, dev_warn_once(&rspi->ctlr->dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment