From: Laxman Dewangan Date: Fri, 22 Jun 2012 15:11:10 +0000 (+0530) Subject: dma: tegra: use sg_dma_address() for getting dma buffer address X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=597c854974db20eebe87e91df0d12daaefabf525;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git dma: tegra: use sg_dma_address() for getting dma buffer address Use the sg_dma_address() to get the segment buffer address for DMA transfer in place of sg_phys() which returns the physical address of an sg entry. The sg_dma_address() returns the correct buffer memory address for DMA transfer. Signed-off-by: Laxman Dewangan Acked-by: Stephen Warren Signed-off-by: Vinod Koul --- diff --git a/drivers/dma/tegra20-apb-dma.c b/drivers/dma/tegra20-apb-dma.c index 134ea7cfc795..6d7d5d383cb1 100644 --- a/drivers/dma/tegra20-apb-dma.c +++ b/drivers/dma/tegra20-apb-dma.c @@ -929,7 +929,7 @@ static struct dma_async_tx_descriptor *tegra_dma_prep_slave_sg( for_each_sg(sgl, sg, sg_len, i) { u32 len, mem; - mem = sg_phys(sg); + mem = sg_dma_address(sg); len = sg_dma_len(sg); if ((len & 3) || (mem & 3) ||