summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/sprd-iommu.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2021-04-01 15:56:25 +0200
committerJoerg Roedel <jroedel@suse.de>2021-04-16 17:19:04 +0200
commitc0aec6680b6c82fe893a546e322e1130cd5cf21e (patch)
treedb60787936d90a2a97cc174e4af6c2d7d2aec5b3 /drivers/iommu/sprd-iommu.c
parentMerge branches 'iommu/fixes', 'arm/mediatek', 'arm/smmu', 'arm/exynos', 'unis... (diff)
downloadlinux-c0aec6680b6c82fe893a546e322e1130cd5cf21e.tar.xz
linux-c0aec6680b6c82fe893a546e322e1130cd5cf21e.zip
iommu: Statically set module owner
It happens that the 3 drivers which first supported being modular are also ones which play games with their pgsize_bitmap, so have non-const iommu_ops where dynamically setting the owner manages to work out OK. However, it's less than ideal to force that upon all drivers which want to be modular - like the new sprd-iommu driver which now has a potential bug in that regard - so let's just statically set the module owner and let ops remain const wherever possible. Reviewed-by: Christoph Hellwig <hch@lst.de> Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/31423b99ff609c3d4b291c701a7a7a810d9ce8dc.1617285386.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/sprd-iommu.c')
-rw-r--r--drivers/iommu/sprd-iommu.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/drivers/iommu/sprd-iommu.c b/drivers/iommu/sprd-iommu.c
index 3811a5085b50..89272f9fd8f3 100644
--- a/drivers/iommu/sprd-iommu.c
+++ b/drivers/iommu/sprd-iommu.c
@@ -436,6 +436,7 @@ static const struct iommu_ops sprd_iommu_ops = {
.device_group = sprd_iommu_device_group,
.of_xlate = sprd_iommu_of_xlate,
.pgsize_bitmap = ~0UL << SPRD_IOMMU_PAGE_SHIFT,
+ .owner = THIS_MODULE,
};
static const struct of_device_id sprd_iommu_of_match[] = {