]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/blobdiff - include/linux/of_iommu.h
coredump: Ensure proper size of sparse core files
[mirror_ubuntu-bionic-kernel.git] / include / linux / of_iommu.h
index e80b9c762a03593ba47c905d34f6996f7a772bc0..6a7fc50510999eb330982c3d7b4452cb373063e2 100644 (file)
@@ -31,8 +31,16 @@ static inline const struct iommu_ops *of_iommu_configure(struct device *dev,
 
 #endif /* CONFIG_OF_IOMMU */
 
-void of_iommu_set_ops(struct device_node *np, const struct iommu_ops *ops);
-const struct iommu_ops *of_iommu_get_ops(struct device_node *np);
+static inline void of_iommu_set_ops(struct device_node *np,
+                                   const struct iommu_ops *ops)
+{
+       iommu_register_instance(&np->fwnode, ops);
+}
+
+static inline const struct iommu_ops *of_iommu_get_ops(struct device_node *np)
+{
+       return iommu_get_instance(&np->fwnode);
+}
 
 extern struct of_device_id __iommu_of_table;