Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b22f6434 authored by Thierry Reding's avatar Thierry Reding Committed by Joerg Roedel
Browse files

iommu: Constify struct iommu_ops



This structure is read-only data and should never be modified.

Signed-off-by: default avatarThierry Reding <treding@nvidia.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 066f2e98
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ LIST_HEAD(hpet_map);
 */
static struct protection_domain *pt_domain;

static struct iommu_ops amd_iommu_ops;
static const struct iommu_ops amd_iommu_ops;

static ATOMIC_NOTIFIER_HEAD(ppr_notifier);
int amd_iommu_max_glx_val = -1;
@@ -3395,7 +3395,7 @@ static int amd_iommu_domain_has_cap(struct iommu_domain *domain,
	return 0;
}

static struct iommu_ops amd_iommu_ops = {
static const struct iommu_ops amd_iommu_ops = {
	.domain_init = amd_iommu_domain_init,
	.domain_destroy = amd_iommu_domain_destroy,
	.attach_dev = amd_iommu_attach_device,
+1 −1
Original line number Diff line number Diff line
@@ -1609,7 +1609,7 @@ static void arm_smmu_remove_device(struct device *dev)
	iommu_group_remove_device(dev);
}

static struct iommu_ops arm_smmu_ops = {
static const struct iommu_ops arm_smmu_ops = {
	.domain_init	= arm_smmu_domain_init,
	.domain_destroy	= arm_smmu_domain_destroy,
	.attach_dev	= arm_smmu_attach_dev,
+1 −1
Original line number Diff line number Diff line
@@ -1170,7 +1170,7 @@ static void exynos_iommu_remove_device(struct device *dev)
	iommu_group_remove_device(dev);
}

static struct iommu_ops exynos_iommu_ops = {
static const struct iommu_ops exynos_iommu_ops = {
	.domain_init = exynos_iommu_domain_init,
	.domain_destroy = exynos_iommu_domain_destroy,
	.attach_dev = exynos_iommu_attach_device,
+1 −1
Original line number Diff line number Diff line
@@ -1076,7 +1076,7 @@ static u32 fsl_pamu_get_windows(struct iommu_domain *domain)
	return dma_domain->win_cnt;
}

static struct iommu_ops fsl_pamu_ops = {
static const struct iommu_ops fsl_pamu_ops = {
	.domain_init	= fsl_pamu_domain_init,
	.domain_destroy = fsl_pamu_domain_destroy,
	.attach_dev	= fsl_pamu_attach_device,
+2 −2
Original line number Diff line number Diff line
@@ -450,7 +450,7 @@ EXPORT_SYMBOL_GPL(intel_iommu_gfx_mapped);
static DEFINE_SPINLOCK(device_domain_lock);
static LIST_HEAD(device_domain_list);

static struct iommu_ops intel_iommu_ops;
static const struct iommu_ops intel_iommu_ops;

static int __init intel_iommu_setup(char *str)
{
@@ -4453,7 +4453,7 @@ static void intel_iommu_remove_device(struct device *dev)
	iommu_device_unlink(iommu->iommu_dev, dev);
}

static struct iommu_ops intel_iommu_ops = {
static const struct iommu_ops intel_iommu_ops = {
	.domain_init	= intel_iommu_domain_init,
	.domain_destroy = intel_iommu_domain_destroy,
	.attach_dev	= intel_iommu_attach_device,
Loading