diff options
author | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-10-31 17:07:16 +0100 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2009-11-23 13:53:54 +0100 |
commit | ef1baed8870d1eebb0c08d9a466e703f1a21b484 (patch) | |
tree | db1f7d3b5ee8d34e4778bfae66c86ff33e10ca0a /arch/arm/include/asm/dma-mapping.h | |
parent | ARM: dma-mapping: simplify page_to_dma() and __pfn_to_bus() (diff) | |
download | linux-ef1baed8870d1eebb0c08d9a466e703f1a21b484.tar.xz linux-ef1baed8870d1eebb0c08d9a466e703f1a21b484.zip |
ARM: dma-mapping: provide dma_to_page()
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tested-By: Jamie Iles <jamie@jamieiles.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, 10 insertions, 0 deletions
diff --git a/arch/arm/include/asm/dma-mapping.h b/arch/arm/include/asm/dma-mapping.h index 5d78eb163953..f06d80c22748 100644 --- a/arch/arm/include/asm/dma-mapping.h +++ b/arch/arm/include/asm/dma-mapping.h @@ -20,6 +20,11 @@ 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)); } +static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) +{ + return pfn_to_page(__bus_to_pfn(addr)); +} + static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) { return (void *)__bus_to_virt(addr); @@ -35,6 +40,11 @@ static inline dma_addr_t page_to_dma(struct device *dev, struct page *page) return __arch_page_to_dma(dev, page); } +static inline struct page *dma_to_page(struct device *dev, dma_addr_t addr) +{ + return __arch_dma_to_page(dev, addr); +} + static inline void *dma_to_virt(struct device *dev, dma_addr_t addr) { return __arch_dma_to_virt(dev, addr); |