Skip to content

Commit

Permalink
dmaengine: doc: client: Update for dmaengine_get_dma_device() usage
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Peter Ujfalusi authored and Vinod Koul committed Dec 11, 2020
1 parent ab650ef commit f082c6d
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Documentation/driver-api/dmaengine/client.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit f082c6d

Please sign in to comment.