提交 cceb8451 编写于 作者: A Arvind Yadav 提交者: Joerg Roedel

iommu/s390: Constify iommu_ops

iommu_ops are not supposed to change at runtime.
Functions 'bus_set_iommu' working with const iommu_ops provided
by <linux/iommu.h>. So mark the non-const structs as const.
Signed-off-by: NArvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: NGerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: NJoerg Roedel <jroedel@suse.de>
上级 f42c2235
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
*/ */
#define S390_IOMMU_PGSIZES (~0xFFFUL) #define S390_IOMMU_PGSIZES (~0xFFFUL)
static struct iommu_ops s390_iommu_ops; static const struct iommu_ops s390_iommu_ops;
struct s390_domain { struct s390_domain {
struct iommu_domain domain; struct iommu_domain domain;
...@@ -362,7 +362,7 @@ void zpci_destroy_iommu(struct zpci_dev *zdev) ...@@ -362,7 +362,7 @@ void zpci_destroy_iommu(struct zpci_dev *zdev)
iommu_device_sysfs_remove(&zdev->iommu_dev); iommu_device_sysfs_remove(&zdev->iommu_dev);
} }
static struct iommu_ops s390_iommu_ops = { static const struct iommu_ops s390_iommu_ops = {
.capable = s390_iommu_capable, .capable = s390_iommu_capable,
.domain_alloc = s390_domain_alloc, .domain_alloc = s390_domain_alloc,
.domain_free = s390_domain_free, .domain_free = s390_domain_free,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册