Skip to content

Commit

Permalink
iommu/iova: Fix compile error with CONFIG_IOMMU_IOVA=m
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Joerg Roedel committed Mar 22, 2017
1 parent 21aff52 commit b4d8c7a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/linux/iova.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);

Expand Down

0 comments on commit b4d8c7a

Please sign in to comment.