dmaengine: Clarify device parameter for dma_sync_*_for_*()

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Vinod Koul <vinod.koul@intel.com>
This commit is contained in:
Geert Uytterhoeven 2014-07-11 17:56:21 +02:00 коммит произвёл Vinod Koul
Родитель 211bfef7c2
Коммит 70c9b8bd7a
1 изменённых файлов: 4 добавлений и 2 удалений

Просмотреть файл

@ -100,8 +100,10 @@ The slave DMA usage consists of following steps:
The peripheral driver is expected to have mapped the scatterlist for The peripheral driver is expected to have mapped the scatterlist for
the DMA operation prior to calling device_prep_slave_sg, and must the DMA operation prior to calling device_prep_slave_sg, and must
keep the scatterlist mapped until the DMA operation has completed. keep the scatterlist mapped until the DMA operation has completed.
The scatterlist must be mapped using the DMA struct device. So, The scatterlist must be mapped using the DMA struct device.
normal setup should look like this: If a mapping needs to be synchronized later, dma_sync_*_for_*() must be
called using the DMA struct device, too.
So, normal setup should look like this:
nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len); nr_sg = dma_map_sg(chan->device->dev, sgl, sg_len);
if (nr_sg == 0) if (nr_sg == 0)