diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-31 15:58:30 +0000 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-23 12:53:26 +0000 |
commit | 1c4a4f48a14861a567c8861355bc8252da3a003f (patch) | |
tree | 03285de0d6347b409f9691d32a36b61d7c1eac63 /arch/arm/include/asm/dma-mapping.h | |
parent | 719301ff1c77b6da7b1b6f78a1e51af64a678619 (diff) | |
download | linux-3.10-1c4a4f48a14861a567c8861355bc8252da3a003f.tar.gz linux-3.10-1c4a4f48a14861a567c8861355bc8252da3a003f.tar.bz2 linux-3.10-1c4a4f48a14861a567c8861355bc8252da3a003f.zip |
ARM: dma-mapping: simplify page_to_dma() and __pfn_to_bus()
The non-highmem() and the __pfn_to_bus() based page_to_dma() both
compile to the same code, so its pointless having these two different
approaches. Use the __pfn_to_bus() based version.
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-By: Jamie Iles <jamie@jamieiles.com>
Reviewed-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'arch/arm/include/asm/dma-mapping.h')
-rw-r--r-- | arch/arm/include/asm/dma-mapping.h | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index ff46dfa68a9..5d78eb16395 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -15,20 +15,10 @@ * must not be used by drivers. */ #ifndef __arch_page_to_dma - -#if !defined(CONFIG_HIGHMEM) -static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) -{ - return (dma_addr_t)__virt_to_bus((unsigned long)page_address(page)); -} -#elif defined(__pfn_to_bus) static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) { return (dma_addr_t)__pfn_to_bus(page_to_pfn(page)); } -#else -#error "this machine class needs to define __arch_page_to_dma to use HIGHMEM" -#endif static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) { |