Skip to content

Commit 90012c6

Browse files
vinodkoulgregkh
authored andcommitted
spi: core: add dma_map_dev for __spi_unmap_msg()
commit 409543c upstream. Commit b470e10 ("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: b470e10 ("spi: core: add dma_map_dev for dma device") Cc: stable@vger.kernel.org # v5.14+ Signed-off-by: Vinod Koul <vkoul@kernel.org> Link: https://lore.kernel.org/r/20220406132238.1029249-1-vkoul@kernel.org Signed-off-by: Mark Brown <broonie@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 887366f commit 90012c6

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

drivers/spi/spi.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1072,11 +1072,15 @@ static int __spi_unmap_msg(struct spi_controller *ctlr, struct spi_message *msg)
10721072

10731073
if (ctlr->dma_tx)
10741074
tx_dev = ctlr->dma_tx->device->dev;
1075+
else if (ctlr->dma_map_dev)
1076+
tx_dev = ctlr->dma_map_dev;
10751077
else
10761078
tx_dev = ctlr->dev.parent;
10771079

10781080
if (ctlr->dma_rx)
10791081
rx_dev = ctlr->dma_rx->device->dev;
1082+
else if (ctlr->dma_map_dev)
1083+
rx_dev = ctlr->dma_map_dev;
10801084
else
10811085
rx_dev = ctlr->dev.parent;
10821086

0 commit comments

Comments
 (0)