summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/mtk_iommu_v1.c
diff options
context:
space:
mode:
authorArvind Yadav2018-10-18 13:13:38 +0200
committerJoerg Roedel2018-11-06 16:40:29 +0100
commitb65f501627fffc0464607244b05e7a2d3677d654 (patch)
treec8ddc04db9441e0c4e4239cd3c61b3baf62e60c1 /drivers/iommu/mtk_iommu_v1.c
parentLinux 4.20-rc1 (diff)
downloadkernel-qcow2-linux-b65f501627fffc0464607244b05e7a2d3677d654.tar.gz
kernel-qcow2-linux-b65f501627fffc0464607244b05e7a2d3677d654.tar.xz
kernel-qcow2-linux-b65f501627fffc0464607244b05e7a2d3677d654.zip
iommu/mediatek: Constify iommu_ops
iommu_ops are not supposed to change at runtime. Functions 'iommu_device_set_ops' and '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> Signed-off-by: Yong Wu <yong.wu@mediatek.com> (Change the title to iommu/mediatek: xx) Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/mtk_iommu_v1.c')
-rw-r--r--drivers/iommu/mtk_iommu_v1.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/iommu/mtk_iommu_v1.c b/drivers/iommu/mtk_iommu_v1.c
index 0e780848f59b..27867b862d7a 100644
--- a/drivers/iommu/mtk_iommu_v1.c
+++ b/drivers/iommu/mtk_iommu_v1.c
@@ -362,7 +362,7 @@ static phys_addr_t mtk_iommu_iova_to_phys(struct iommu_domain *domain,
return pa;
}
-static struct iommu_ops mtk_iommu_ops;
+static const struct iommu_ops mtk_iommu_ops;
/*
* MTK generation one iommu HW only support one iommu domain, and all the client
@@ -524,7 +524,7 @@ static int mtk_iommu_hw_init(const struct mtk_iommu_data *data)
return 0;
}
-static struct iommu_ops mtk_iommu_ops = {
+static const struct iommu_ops mtk_iommu_ops = {
.domain_alloc = mtk_iommu_domain_alloc,
.domain_free = mtk_iommu_domain_free,
.attach_dev = mtk_iommu_attach_device,