diff options
author | Arvind Yadav <arvind.yadav.cs@gmail.com> | 2017-08-28 08:12:50 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2017-08-30 11:53:29 -0400 |
commit | cceb84519520c775d2660ea6b878215cd116af75 (patch) | |
tree | 8901b8c8a7eacd2c7e4e0564eb3c6a9400dffd21 | |
parent | f42c22351455bcc8b9eecea19b48bdb499a50a65 (diff) |
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: Arvind Yadav <arvind.yadav.cs@gmail.com>
Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
-rw-r--r-- | drivers/iommu/s390-iommu.c | 4 |
1 files changed, 2 insertions, 2 deletions
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 @@ | |||
18 | */ | 18 | */ |
19 | #define S390_IOMMU_PGSIZES (~0xFFFUL) | 19 | #define S390_IOMMU_PGSIZES (~0xFFFUL) |
20 | 20 | ||
21 | static struct iommu_ops s390_iommu_ops; | 21 | static const struct iommu_ops s390_iommu_ops; |
22 | 22 | ||
23 | struct s390_domain { | 23 | struct s390_domain { |
24 | struct iommu_domain domain; | 24 | struct iommu_domain domain; |
@@ -362,7 +362,7 @@ void zpci_destroy_iommu(struct zpci_dev *zdev) | |||
362 | iommu_device_sysfs_remove(&zdev->iommu_dev); | 362 | iommu_device_sysfs_remove(&zdev->iommu_dev); |
363 | } | 363 | } |
364 | 364 | ||
365 | static struct iommu_ops s390_iommu_ops = { | 365 | static const struct iommu_ops s390_iommu_ops = { |
366 | .capable = s390_iommu_capable, | 366 | .capable = s390_iommu_capable, |
367 | .domain_alloc = s390_domain_alloc, | 367 | .domain_alloc = s390_domain_alloc, |
368 | .domain_free = s390_domain_free, | 368 | .domain_free = s390_domain_free, |