Pull cpuidle into release branch
[pandora-kernel.git] / arch / blackfin / kernel / dma-mapping.c
index ea48d5b..d6b61d5 100644 (file)
@@ -35,6 +35,7 @@
 #include <linux/device.h>
 #include <linux/dma-mapping.h>
 #include <linux/io.h>
+#include <linux/scatterlist.h>
 #include <asm/cacheflush.h>
 #include <asm/bfin-global.h>
 
@@ -160,7 +161,7 @@ dma_map_sg(struct device *dev, struct scatterlist *sg, int nents,
        BUG_ON(direction == DMA_NONE);
 
        for (i = 0; i < nents; i++, sg++) {
-               sg->dma_address = page_address(sg->page) + sg->offset;
+               sg->dma_address = (dma_addr_t) sg_virt(sg);
 
                invalidate_dcache_range(sg_dma_address(sg),
                                        sg_dma_address(sg) +