]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
authorJoerg Roedel <jroedel@suse.de>
Wed, 22 Mar 2017 23:06:17 +0000 (00:06 +0100)
committerJoerg Roedel <jroedel@suse.de>
Wed, 22 Mar 2017 23:06:17 +0000 (00:06 +0100)
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 <jroedel@suse.de>
include/linux/iova.h

index 548982ad5f2fdfca66427c1b62a756511429594f..e0a892ae45c0834a82d42e06a6bfab65b424c899 100644 (file)
@@ -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);