Re: [PATCH v2 1/1] mmc: use dmaengine_get_dma_device() instead of chan->device->dev
From: Vinod Koul
Date: Fri Sep 18 2026 - 13:53:46 EST
On 18-09-26, 11:23, Frank.Li@xxxxxxxxxxx wrote:
> From: Frank Li <Frank.Li@xxxxxxx>
>
> Replace direct dma_chan::device::dev access with the proper
> dmaengine_get_dma_device() for consumer API
>
> chan->device->dev is not always the device used for DMA mapping.
> Some DMA engines support per-channel IOMMU mappings, so different
> channels may use different DMA devices. dmaengine_get_dma_device()
> returns the correct device for each channel.
>
> This also prepares for making the DMA engine provider data structures
> private. DMA consumers should not access DMA engine internals directly.
>
> Assisted-by: LLM
> Reviewed-by: Linus Walleij <linusw@xxxxxxxxxx>
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
Reviewed-by: Vinod Koul <vkoul@xxxxxxxxxx>
--
~Vinod