aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2013-01-24 15:16:56 +0200
committerMarek Szyprowski <m.szyprowski@samsung.com>2013-02-25 15:30:41 +0100
commitfab112a394b9cf5e3bf888af6ff5076ba9fa0f06 (patch)
tree0796a9f812a400c786a3a8c9cee0f19e361171c5 /arch/arm/include
parentd09e1333ec6c8c6fe2875dc2763ebbac84efe8d7 (diff)
downloadlinux-fab112a394b9cf5e3bf888af6ff5076ba9fa0f06.tar.gz
ARM: dma-mapping: Add macro to_dma_iommu_mapping()
This can be built without CONFIG_ARM_DMA_USE_IOMMU. Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/device.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h
index b69c0d3285f..dc662fca923 100644
--- a/arch/arm/include/asm/device.h
+++ b/arch/arm/include/asm/device.h
@@ -27,4 +27,10 @@ struct pdev_archdata {
#endif
};
+#ifdef CONFIG_ARM_DMA_USE_IOMMU
+#define to_dma_iommu_mapping(dev) ((dev)->archdata.mapping)
+#else
+#define to_dma_iommu_mapping(dev) NULL
+#endif
+
#endif