Re: [PATCH 1/1] iio: use dmaengine_get_dma_device() instead of chan->device->dev
From: Vinod Koul
Date: Fri Sep 18 2026 - 13:57:49 EST
On 17-09-26, 16:36, Frank.Li@xxxxxxxxxxx wrote:
> From: Frank Li <Frank.Li@xxxxxxx>
>
> Replace direct dma_chan::device::dev access with the proper
> dmaengine_get_dma_device() accessor in IIO DMA consumers.
>
> 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
> Signed-off-by: Frank Li <Frank.Li@xxxxxxx>
Reviewed-by: Vinod Koul <vkoul@xxxxxxxxxx>
--
~Vinod