From: Arvind Yadav Date: Mon, 28 Aug 2017 12:12:50 +0000 (+0530) Subject: iommu/s390: Constify iommu_ops X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=cceb84519520c775d2660ea6b878215cd116af75;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git 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 . So mark the non-const structs as const. Signed-off-by: Arvind Yadav Acked-by: Gerald Schaefer Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/s390-iommu.c b/drivers/iommu/s390-iommu.c index 85f3bc52efc2..0e2f31f9032b 100644 --- a/drivers/iommu/s390-iommu.c +++ b/drivers/iommu/s390-iommu.c @@ -18,7 +18,7 @@ */ #define S390_IOMMU_PGSIZES (~0xFFFUL) -static struct iommu_ops s390_iommu_ops; +static const struct iommu_ops s390_iommu_ops; struct s390_domain { struct iommu_domain domain; @@ -362,7 +362,7 @@ void zpci_destroy_iommu(struct zpci_dev *zdev) 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, .domain_alloc = s390_domain_alloc, .domain_free = s390_domain_free,