Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dmaengine: doc: client: Update for dmaengine_get_dma_device() usage

Client drivers should use the dmaengine_get_dma_device(chan) to get the
device pointer which should be used for DMA API for allocations and
mapping.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201208090440.31792-10-peter.ujfalusi@ti.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Peter Ujfalusi and committed by
Vinod Koul
f082c6df ab650ef6

+3 -1
+3 -1
Documentation/driver-api/dmaengine/client.rst
··· 120 120 121 121 .. code-block:: c 122 122 123 - nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len); 123 + struct device *dma_dev = dmaengine_get_dma_device(chan); 124 + 125 + nr_sg = dma_map_sg(dma_dev, sgl, sg_len); 124 126 if (nr_sg == 0) 125 127 /* error */ 126 128