From e25549bc6a3999afe92fd89030942cc6552679ae Mon Sep 17 00:00:00 2001 From: Hiroshi Doyu Date: Thu, 24 Jan 2013 15:16:56 +0200 Subject: [PATCH] ARM: dma-mapping: Add macro to_dma_iommu_mapping() This can be built without CONFIG_ARM_DMA_USE_IOMMU. Signed-off-by: Hiroshi Doyu Signed-off-by: Marek Szyprowski --- arch/arm/include/asm/device.h | 6 ++++++ 1 file changed, 6 insertions(+) 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 -- 2.39.5