From: Hiroshi Doyu Date: Thu, 24 Jan 2013 13:16:56 +0000 (+0200) Subject: ARM: dma-mapping: Add macro to_dma_iommu_mapping() X-Git-Tag: v3.9-rc1~74^2~6 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fab112a394b9cf5e3bf888af6ff5076ba9fa0f06;p=platform%2Fkernel%2Flinux-stable.git 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 --- diff --git a/arch/arm/include/asm/device.h b/arch/arm/include/asm/device.h index b69c0d3..dc662fc 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