summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHiroshi Doyu <hdoyu@nvidia.com>2012-12-05 18:50:49 +0200
committerHarshada Kale <hkale@nvidia.com>2013-06-10 03:51:54 -0700
commit4bb355d3cddfc58e998f37dcf263eb707fc45110 (patch)
treea52d9b5799d1ab8637c1009555fa13c78e8cc941
parent0fb92b140130138427701ee5bd6600e1b41a1cc9 (diff)
ARM: dma-mapping: Add macro to_dma_iommu_mapping()
To build without CONFIG_ARM_DMA_USE_IOMMU bug 1286500 Change-Id: I1a6e385bd6b4039fcc37e120893b98e3ef590746 (cherry picked from commit 094c98e7c4346961b9ad7f741a5d3756c671a071) Signed-off-by: Hiroshi Doyu <hdoyu@nvidia.com> Reviewed-on: http://git-master/r/234134 Reviewed-by: Krishna Reddy <vdumpa@nvidia.com>
-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 b69c0d3285f8..dc662fca9230 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