Commit f082c6df authored by Peter Ujfalusi's avatar Peter Ujfalusi Committed by Vinod Koul

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: default avatarPeter Ujfalusi <peter.ujfalusi@ti.com>
Link: https://lore.kernel.org/r/20201208090440.31792-10-peter.ujfalusi@ti.comSigned-off-by: default avatarVinod Koul <vkoul@kernel.org>
parent ab650ef6
...@@ -120,7 +120,9 @@ The details of these operations are: ...@@ -120,7 +120,9 @@ The details of these operations are:
.. code-block:: c .. code-block:: c
nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len); struct device *dma_dev = dmaengine_get_dma_device(chan);
nr_sg = dma_map_sg(dma_dev, sgl, sg_len);
if (nr_sg == 0) if (nr_sg == 0)
/* error */ /* error */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment