diff options
author | Thierry Reding <treding@nvidia.com> | 2014-06-27 09:03:12 +0200 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2014-07-07 10:36:59 +0200 |
commit | b22f6434cf48af001330e370e9d781aeb668f98c (patch) | |
tree | 1d8b3b61fef931cebc89278be309b0d75e07669a /include | |
parent | 066f2e98d8c7f043747fb08ebaa66bad723b1121 (diff) | |
download | blackbird-obmc-linux-b22f6434cf48af001330e370e9d781aeb668f98c.tar.gz blackbird-obmc-linux-b22f6434cf48af001330e370e9d781aeb668f98c.zip |
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 { const struct dev_pm_ops *pm; - struct iommu_ops *iommu_ops; + const struct iommu_ops *iommu_ops; struct subsys_private *p; 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 { }; struct iommu_domain { - struct iommu_ops *ops; + const struct iommu_ops *ops; void *priv; iommu_fault_handler_t handler; void *handler_token; @@ -140,7 +140,7 @@ struct iommu_ops { #define IOMMU_GROUP_NOTIFY_UNBIND_DRIVER 5 /* Pre Driver unbind */ #define IOMMU_GROUP_NOTIFY_UNBOUND_DRIVER 6 /* Post Driver unbind */ -extern int bus_set_iommu(struct bus_type *bus, struct iommu_ops *ops); +extern int bus_set_iommu(struct bus_type *bus, const struct iommu_ops *ops); extern bool iommu_present(struct bus_type *bus); extern struct iommu_domain *iommu_domain_alloc(struct bus_type *bus); extern struct iommu_group *iommu_group_get_by_id(int id); |