]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commitdiff
iommu/s390: Constify iommu_ops
authorArvind Yadav <arvind.yadav.cs@gmail.com>
Mon, 28 Aug 2017 12:12:50 +0000 (17:42 +0530)
committerJoerg Roedel <jroedel@suse.de>
Wed, 30 Aug 2017 15:53:29 +0000 (17:53 +0200)
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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
drivers/iommu/s390-iommu.c

index 85f3bc52efc2ece4b81b5ff82a3849cecc8944b9..0e2f31f9032bc922c80c4a9b0b9417883195caeb 100644 (file)
@@ -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,