From: Peter Ujfalusi Date: Tue, 8 Dec 2020 09:04:29 +0000 (+0200) Subject: dmaengine: doc: client: Update for dmaengine_get_dma_device() usage X-Git-Tag: v5.11-rc1~79^2~12 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f082c6df970e6e9aa97af35e826fec824007fbae;p=thirdparty%2Fkernel%2Flinux.git 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 Link: https://lore.kernel.org/r/20201208090440.31792-10-peter.ujfalusi@ti.com Signed-off-by: Vinod Koul --- diff --git a/Documentation/driver-api/dmaengine/client.rst b/Documentation/driver-api/dmaengine/client.rst index 09a3f66dcd263..bfd057b21a000 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 */