summaryrefslogtreecommitdiff
path: root/include/linux/iommu.h
diff options
context:
space:
mode:
authorThierry Reding <treding@nvidia.com>2014-06-27 11:03:12 +0400
committerJoerg Roedel <jroedel@suse.de>2014-07-07 12:36:59 +0400
commitb22f6434cf48af001330e370e9d781aeb668f98c (patch)
tree1d8b3b61fef931cebc89278be309b0d75e07669a /include/linux/iommu.h
parent066f2e98d8c7f043747fb08ebaa66bad723b1121 (diff)
downloadlinux-b22f6434cf48af001330e370e9d781aeb668f98c.tar.xz
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/linux/iommu.h')
-rw-r--r--include/linux/iommu.h4
1 files changed, 2 insertions, 2 deletions
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);