Merge branch 'for-4.3/sg' of git://git.kernel.dk/linux-block
[cascardo/linux.git] / arch / arm / mm / dma-mapping.c
index cba12f3..3d3d6aa 100644 (file)
@@ -1520,7 +1520,7 @@ static int __map_sg_chunk(struct device *dev, struct scatterlist *sg,
                return -ENOMEM;
 
        for (count = 0, s = sg; count < (size >> PAGE_SHIFT); s = sg_next(s)) {
-               phys_addr_t phys = page_to_phys(sg_page(s));
+               phys_addr_t phys = sg_phys(s) & PAGE_MASK;
                unsigned int len = PAGE_ALIGN(s->offset + s->length);
 
                if (!is_coherent &&