From: Matt Porter Date: Wed, 27 Jul 2005 18:44:12 +0000 (-0700) Subject: [PATCH] ppc32: fix dma_map_page() to use page_to_bus() X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9f6a3d083729c76ced92106c259f0e6536a2eaea;p=GitHub%2FLineageOS%2Fandroid_kernel_samsung_universal7580.git [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 --- diff --git a/include/asm-ppc/dma-mapping.h b/include/asm-ppc/dma-mapping.h index 7f0487afebb..6f74f59938d 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. */