[PATCH] ppc32: fix dma_map_page() to use page_to_bus()
authorMatt Porter <mporter@kernel.crashing.org>
Wed, 27 Jul 2005 18:44:12 +0000 (11:44 -0700)
committerLinus Torvalds <torvalds@g5.osdl.org>
Wed, 27 Jul 2005 23:25:56 +0000 (16:25 -0700)
The following trivial patch changes dma_map_page() to use page_to_bus()
instead of open-coding it (incorrectly in some cases).

Signed-off-by: Eugene Surovegin <ebs@ebshome.net>
Signed-off-by: Matt Porter <mporter@kernel.crashing.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
include/asm-ppc/dma-mapping.h

index 7f0487afebbee99e0488465a137de11bd77e575e..6f74f59938d4970d72ac74943f223baacf362669 100644 (file)
@@ -117,7 +117,7 @@ dma_map_page(struct device *dev, struct page *page,
 
        __dma_sync_page(page, offset, size, direction);
 
-       return (page - mem_map) * PAGE_SIZE + PCI_DRAM_OFFSET + offset;
+       return page_to_bus(page) + offset;
 }
 
 /* We do nothing. */