From: Joerg Roedel Date: Wed, 22 Mar 2017 23:06:17 +0000 (+0100) Subject: iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m X-Git-Tag: v4.12-rc1~50^2^9~7 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=b4d8c7aea15efa8c6272c58d78296f8b017c4c6a;p=platform%2Fkernel%2Flinux-exynos.git iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m The #ifdef in iova.h only catches the CONFIG_IOMMU_IOVA=y case, so that compilation as a module fails with duplicate function definition errors. Fix it by catching both cases in the #if. Signed-off-by: Joerg Roedel --- diff --git a/include/linux/iova.h b/include/linux/iova.h index 548982a..e0a892a 100644 --- a/include/linux/iova.h +++ b/include/linux/iova.h @@ -82,7 +82,7 @@ static inline unsigned long iova_pfn(struct iova_domain *iovad, dma_addr_t iova) return iova >> iova_shift(iovad); } -#ifdef CONFIG_IOMMU_IOVA +#if IS_ENABLED(CONFIG_IOMMU_IOVA) int iova_cache_get(void); void iova_cache_put(void);