diff options
author | Thierry Reding <treding@nvidia.com> | 2014-06-27 03:03:12 -0400 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-07 04:36:59 -0400 |
commit | b22f6434cf48af001330e370e9d781aeb668f98c (patch) | |
tree | 1d8b3b61fef931cebc89278be309b0d75e07669a /include | |
parent | 066f2e98d8c7f043747fb08ebaa66bad723b1121 (diff) |
iommu: Constify struct iommu_ops
This structure is read-only data and should never be modified.
Signed-off-by: Thierry Reding <treding@nvidia.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/device.h | 2 | ||||
-rw-r--r-- | include/linux/iommu.h | 4 |
2 files changed, 3 insertions, 3 deletions
diff --git a/include/linux/device.h b/include/linux/device.h index af424acd393d..75f5bcb8930b 100644 --- a/include/linux/device.h +++ b/include/linux/device.h | |||
@@ -124,7 +124,7 @@ struct bus_type { | |||
124 | 124 | ||
125 | const struct dev_pm_ops *pm; | 125 | const struct dev_pm_ops *pm; |
126 | 126 | ||
127 | struct iommu_ops *iommu_ops; | 127 | const struct iommu_ops *iommu_ops; |
128 | 128 | ||
129 | struct subsys_private *p; | 129 | struct subsys_private *p; |
130 | struct lock_class_key lock_key; | 130 | struct lock_class_key lock_key; |
diff --git a/include/linux/iommu.h b/include/linux/iommu.h index 7fd16e3d1f25..c7097d7f024c 100644 --- a/include/linux/iommu.h +++ b/include/linux/iommu.h | |||
@@ -50,7 +50,7 @@ struct iommu_domain_geometry { | |||
50 | }; | 50 | }; |
51 | 51 | ||
52 | struct iommu_domain { | 52 | struct iommu_domain { |
53 | struct iommu_ops *ops; | 53 | const struct iommu_ops *ops; |
54 | void *priv; | 54 | void *priv; |
55 | iommu_fault_handler_t handler; | 55 | iommu_fault_handler_t handler; |
56 | void *handler_token; | 56 | void *handler_token; |
@@ -140,7 +140,7 @@ struct iommu_ops { | |||
140 | #define IOMMU_GROUP_NOTIFY_UNBIND_DRIVER 5 /* Pre Driver unbind */ | 140 | #define IOMMU_GROUP_NOTIFY_UNBIND_DRIVER 5 /* Pre Driver unbind */ |
141 | #define IOMMU_GROUP_NOTIFY_UNBOUND_DRIVER 6 /* Post Driver unbind */ | 141 | #define IOMMU_GROUP_NOTIFY_UNBOUND_DRIVER 6 /* Post Driver unbind */ |
142 | 142 | ||
143 | extern int bus_set_iommu(struct bus_type *bus, struct iommu_ops *ops); | 143 | extern int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops); |
144 | extern bool iommu_present(struct bus_type *bus); | 144 | extern bool iommu_present(struct bus_type *bus); |
145 | extern struct iommu_domain *iommu_domain_alloc(struct bus_type *bus); | 145 | extern struct iommu_domain *iommu_domain_alloc(struct bus_type *bus); |
146 | extern struct iommu_group *iommu_group_get_by_id(int id); | 146 | extern struct iommu_group *iommu_group_get_by_id(int id); |