projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
35d516b
)
spi: core: add dma_map_dev for __spi_unmap_msg()
author
Vinod Koul
<vkoul@kernel.org>
Wed, 6 Apr 2022 13:22:38 +0000
(18:52 +0530)
committer
Mark Brown
<broonie@kernel.org>
Wed, 6 Apr 2022 14:50:08 +0000
(15:50 +0100)
Commit
b470e10eb43f
("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:
b470e10eb43f
("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>
drivers/spi/spi.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/spi/spi.c
b/drivers/spi/spi.c
index c4dd1200fe99166f81285cdd9a0d09bb4a211f01..32443ae175fd0a01cc6f484098eef898b4e7a31e 100644
(file)
--- a/
drivers/spi/spi.c
+++ b/
drivers/spi/spi.c
@@
-1130,11
+1130,15
@@
static int __spi_unmap_msg(struct spi_controller *ctlr, struct spi_message *msg)
if (ctlr->dma_tx)
tx_dev = ctlr->dma_tx->device->dev;
+ else if (ctlr->dma_map_dev)
+ tx_dev = ctlr->dma_map_dev;
else
tx_dev = ctlr->dev.parent;
if (ctlr->dma_rx)
rx_dev = ctlr->dma_rx->device->dev;
+ else if (ctlr->dma_map_dev)
+ rx_dev = ctlr->dma_map_dev;
else
rx_dev = ctlr->dev.parent;