ARM: dma-mapping: Add macro to_dma_iommu_mapping()
authorHiroshi Doyu <hdoyu@nvidia.com>
Thu, 24 Jan 2013 13:16:56 +0000 (15:16 +0200)
committerMarek Szyprowski <m.szyprowski@samsung.com>
Mon, 25 Feb 2013 14:30:41 +0000 (15:30 +0100)
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>
arch/arm/include/asm/device.h

index b69c0d3285f8e1bcf2193b05f4faed3a169597b4..dc662fca9230d18c6617304c281cf227890342a9 100644 (file)
@@ -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