summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2018-11-28 15:35:24 +0300
committerJoerg Roedel <jroedel@suse.de>2018-12-17 12:38:30 +0300
commitb4ef725eeba158f365da9de1f05149094643ddea (patch)
treecad443190b8c3376c39cc1e45a1146761f080eee /include/linux
parentc4b17afb0a4e8d042320efaf2acf55cb26795f78 (diff)
downloadlinux-b4ef725eeba158f365da9de1f05149094643ddea.tar.xz
iommu: Introduce wrappers around dev->iommu_fwspec
These wrappers will be used to easily change the location of the field later when all users are converted. Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/iommu.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/linux/iommu.h b/include/linux/iommu.h
index 11db18b9ffe8..26225f762cd7 100644
--- a/include/linux/iommu.h
+++ b/include/linux/iommu.h
@@ -398,6 +398,17 @@ void iommu_fwspec_free(struct device *dev);
int iommu_fwspec_add_ids(struct device *dev, u32 *ids, int num_ids);
const struct iommu_ops *iommu_ops_from_fwnode(struct fwnode_handle *fwnode);
+static inline struct iommu_fwspec *dev_iommu_fwspec_get(struct device *dev)
+{
+ return dev->iommu_fwspec;
+}
+
+static inline void dev_iommu_fwspec_set(struct device *dev,
+ struct iommu_fwspec *fwspec)
+{
+ dev->iommu_fwspec = fwspec;
+}
+
#else /* CONFIG_IOMMU_API */
struct iommu_ops {};