summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2019-05-20 03:29:26 -0400
committerJoerg Roedel <jroedel@suse.de>2019-05-27 11:31:10 -0400
commit185da893fab1caa458c47f032a6f53717dbae2eb (patch)
tree579dc81b1f505ab62aad1113f4a974c8e5858726
parentcd6c84d8f0cdc911df435bb075ba22ce3c605b07 (diff)
iommu/dma: Cleanup dma-iommu.h
No need for a __KERNEL__ guard outside uapi and add a missing comment describing the #else cpp statement. Last but not least include <linux/errno.h> instead of the asm version, which is frowned upon. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r--include/linux/dma-iommu.h6
1 files changed, 2 insertions, 4 deletions
diff --git a/include/linux/dma-iommu.h b/include/linux/dma-iommu.h
index 476e0c54de2d..dfb83f9c24dc 100644
--- a/include/linux/dma-iommu.h
+++ b/include/linux/dma-iommu.h
@@ -16,9 +16,8 @@
16#ifndef __DMA_IOMMU_H 16#ifndef __DMA_IOMMU_H
17#define __DMA_IOMMU_H 17#define __DMA_IOMMU_H
18 18
19#ifdef __KERNEL__ 19#include <linux/errno.h>
20#include <linux/types.h> 20#include <linux/types.h>
21#include <asm/errno.h>
22 21
23#ifdef CONFIG_IOMMU_DMA 22#ifdef CONFIG_IOMMU_DMA
24#include <linux/dma-mapping.h> 23#include <linux/dma-mapping.h>
@@ -86,7 +85,7 @@ void iommu_dma_compose_msi_msg(struct msi_desc *desc,
86 85
87void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list); 86void iommu_dma_get_resv_regions(struct device *dev, struct list_head *list);
88 87
89#else 88#else /* CONFIG_IOMMU_DMA */
90 89
91struct iommu_domain; 90struct iommu_domain;
92struct msi_desc; 91struct msi_desc;
@@ -128,5 +127,4 @@ static inline void iommu_dma_get_resv_regions(struct device *dev, struct list_he
128} 127}
129 128
130#endif /* CONFIG_IOMMU_DMA */ 129#endif /* CONFIG_IOMMU_DMA */
131#endif /* __KERNEL__ */
132#endif /* __DMA_IOMMU_H */ 130#endif /* __DMA_IOMMU_H */