From 9f6a3d083729c76ced92106c259f0e6536a2eaea Mon Sep 17 00:00:00 2001 From: Matt Porter Date: Wed, 27 Jul 2005 11:44:12 -0700 Subject: [PATCH] [PATCH] ppc32: fix dma_map_page() to use page_to_bus() 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 Signed-off-by: Matt Porter Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- include/asm-ppc/dma-mapping.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 7f0487afebbe..6f74f59938d4 100644 --- a/include/asm-ppc/dma-mapping.h +++ b/include/asm-ppc/dma-mapping.h @@ -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. */ -- 2.30.2