From c412cb15e0f6afcd517fc766a77b3ac84d73aa4d Mon Sep 17 00:00:00 2001 From: Patrick Daly Date: Mon, 19 Sep 2016 18:25:00 -0700 Subject: iommu: Fix compilation error without CONFIG_IOMMU_API Add an "inline" so the compiler no longer gives a defined-but-not-used warning. Change-Id: I226242bf994e659d8018a885f20c3a3f80b9b8e5 Signed-off-by: Patrick Daly --- include/linux/dma-mapping-fast.h | 2 ++ include/linux/iommu.h | 4 ++-- include/linux/msm_dma_iommu_mapping.h | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/linux/dma-mapping-fast.h b/include/linux/dma-mapping-fast.h index aa9fcfe73162..ddd126c0fd85 100644 --- a/include/linux/dma-mapping-fast.h +++ b/include/linux/dma-mapping-fast.h @@ -16,6 +16,8 @@ #include #include +struct dma_iommu_mapping; + struct dma_fast_smmu_mapping { struct device *dev; struct iommu_domain *domain; diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 56855724271c..f4f5af978c7c 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h @@ -650,8 +650,8 @@ static inline void iommu_device_unlink(struct device *dev, struct device *link) { } -static int iommu_dma_supported(struct iommu_domain *domain, struct device *dev, - u64 mask) +static inline int iommu_dma_supported(struct iommu_domain *domain, + struct device *dev, u64 mask) { return -EINVAL; } diff --git a/include/linux/msm_dma_iommu_mapping.h b/include/linux/msm_dma_iommu_mapping.h index 76451faa2073..73e69383b9b6 100644 --- a/include/linux/msm_dma_iommu_mapping.h +++ b/include/linux/msm_dma_iommu_mapping.h @@ -90,7 +90,7 @@ static inline void msm_dma_unmap_sg(struct device *dev, { } -int msm_dma_unmap_all_for_dev(struct device *dev) +static inline int msm_dma_unmap_all_for_dev(struct device *dev) { return 0; } -- cgit v1.2.3