From: Geliang Tang Date: Thu, 23 Mar 2017 13:16:32 +0000 (+0800) Subject: microblaze: use sg_phys() X-Git-Tag: v4.13-rc1~194^2~9 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=e56751c961eaf232f121025c29af94ab3d64feb2;p=karo-tx-linux.git microblaze: use sg_phys() Use sg_phys() instead of open-coding it. Signed-off-by: Geliang Tang Signed-off-by: Michal Simek --- diff --git a/arch/microblaze/kernel/dma.c b/arch/microblaze/kernel/dma.c index 12e093a03e60..e45ada8fb006 100644 --- a/arch/microblaze/kernel/dma.c +++ b/arch/microblaze/kernel/dma.c @@ -65,8 +65,7 @@ static int dma_direct_map_sg(struct device *dev, struct scatterlist *sgl, if (attrs & DMA_ATTR_SKIP_CPU_SYNC) continue; - __dma_sync(page_to_phys(sg_page(sg)) + sg->offset, - sg->length, direction); + __dma_sync(sg_phys(sg), sg->length, direction); } return nents;