summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2020-12-08 11:04:29 +0200
committerVinod Koul <vkoul@kernel.org>2020-12-11 21:20:08 +0530
commitf082c6df970e6e9aa97af35e826fec824007fbae (patch)
treeaeeff9c11ac9f0959ed1062f9a26bdfe49f1e02e
parentab650ef6d548153862119e1bf3bf267510707f48 (diff)
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>
-rw-r--r--Documentation/driver-api/dmaengine/client.rst4
1 files changed, 3 insertions, 1 deletions
diff --git a/Documentation/driver-api/dmaengine/client.rst b/Documentation/driver-api/dmaengine/client.rst
index 09a3f66dcd26..bfd057b21a00 100644
--- a/Documentation/driver-api/dmaengine/client.rst
+++ b/Documentation/driver-api/dmaengine/client.rst
@@ -120,7 +120,9 @@ The details of these operations are:
.. 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)
/* error */