linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] spi: core: add dma_map_dev for __spi_unmap_msg()
@ 2022-04-06 13:22 Vinod Koul
  2022-04-07 17:12 ` Mark Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Vinod Koul @ 2022-04-06 13:22 UTC (permalink / raw)
  To: Mark Brown
  Cc: linux-arm-msm, Bjorn Andersson, Vinod Koul, linux-spi, linux-kernel

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>
---
 drivers/spi/spi.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/spi/spi.c b/drivers/spi/spi.c
index c4dd1200fe99..32443ae175fd 100644
--- 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;
 
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] spi: core: add dma_map_dev for __spi_unmap_msg()
  2022-04-06 13:22 [PATCH] spi: core: add dma_map_dev for __spi_unmap_msg() Vinod Koul
@ 2022-04-07 17:12 ` Mark Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Mark Brown @ 2022-04-07 17:12 UTC (permalink / raw)
  To: vkoul; +Cc: linux-spi, bjorn.andersson, linux-kernel, linux-arm-msm

On Wed, 6 Apr 2022 18:52:38 +0530, Vinod Koul wrote:
> 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.
> 
> 

Applied to

   https://git.kernel.org/pub/scm/linux/kernel/git/broonie/spi.git for-next

Thanks!

[1/1] spi: core: add dma_map_dev for __spi_unmap_msg()
      commit: 409543cec01a84610029d6440c480c3fdd7214fb

All being well this means that it will be integrated into the linux-next
tree (usually sometime in the next 24 hours) and sent to Linus during
the next merge window (or sooner if it is a bug fix), however if
problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing
and review of the tree, please engage with people reporting problems and
send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they
should be sent as incremental updates against current git, existing
patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying
to this mail.

Thanks,
Mark

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2022-04-07 17:13 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 13:22 [PATCH] spi: core: add dma_map_dev for __spi_unmap_msg() Vinod Koul
2022-04-07 17:12 ` Mark Brown

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).