Commit 409543ce authored by Vinod Koul's avatar Vinod Koul Committed by Mark Brown

spi: core: add dma_map_dev for __spi_unmap_msg()

Commit b470e10e ("spi: core: add dma_map_dev for dma device") added
dma_map_dev for _spi_map_msg() but missed to add for unmap routine,
__spi_unmap_msg(), so add it now.

Fixes: b470e10e ("spi: core: add dma_map_dev for dma device")
Cc: stable@vger.kernel.org # v5.14+
Signed-off-by: default avatarVinod Koul <vkoul@kernel.org>
Link: https://lore.kernel.org/r/20220406132238.1029249-1-vkoul@kernel.orgSigned-off-by: default avatarMark Brown <broonie@kernel.org>
parent 35d516bd
...@@ -1130,11 +1130,15 @@ static int __spi_unmap_msg(struct spi_controller *ctlr, struct spi_message *msg) ...@@ -1130,11 +1130,15 @@ static int __spi_unmap_msg(struct spi_controller *ctlr, struct spi_message *msg)
if (ctlr->dma_tx) if (ctlr->dma_tx)
tx_dev = ctlr->dma_tx->device->dev; tx_dev = ctlr->dma_tx->device->dev;
else if (ctlr->dma_map_dev)
tx_dev = ctlr->dma_map_dev;
else else
tx_dev = ctlr->dev.parent; tx_dev = ctlr->dev.parent;
if (ctlr->dma_rx) if (ctlr->dma_rx)
rx_dev = ctlr->dma_rx->device->dev; rx_dev = ctlr->dma_rx->device->dev;
else if (ctlr->dma_map_dev)
rx_dev = ctlr->dma_map_dev;
else else
rx_dev = ctlr->dev.parent; rx_dev = ctlr->dev.parent;
......
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