summaryrefslogtreecommitdiff
path: root/drivers/iommu/omap-iommu.c
diff options
context:
space:
mode:
authorRobin Murphy <robin.murphy@arm.com>2021-04-01 14:56:26 +0100
committerJoerg Roedel <jroedel@suse.de>2021-04-16 17:20:45 +0200
commit2d471b20c55e13c98d1dba413bf2de618e89cdac (patch)
treefe16cf7ce737c7c60d0cd414199cab0bfb4aea47 /drivers/iommu/omap-iommu.c
parentc0aec6680b6c82fe893a546e322e1130cd5cf21e (diff)
iommu: Streamline registration interface
Rather than have separate opaque setter functions that are easy to overlook and lead to repetitive boilerplate in drivers, let's pass the relevant initialisation parameters directly to iommu_device_register(). Acked-by: Will Deacon <will@kernel.org> Signed-off-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/ab001b87c533b6f4db71eb90db6f888953986c36.1617285386.git.robin.murphy@arm.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/omap-iommu.c')
-rw-r--r--drivers/iommu/omap-iommu.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/iommu/omap-iommu.c b/drivers/iommu/omap-iommu.c
index 71f29c0927fc..26e517eb0dd3 100644
--- a/drivers/iommu/omap-iommu.c
+++ b/drivers/iommu/omap-iommu.c
@@ -1235,10 +1235,7 @@ static int omap_iommu_probe(struct platform_device *pdev)
if (err)
goto out_group;
- iommu_device_set_ops(&obj->iommu, &omap_iommu_ops);
- iommu_device_set_fwnode(&obj->iommu, &of->fwnode);
-
- err = iommu_device_register(&obj->iommu);
+ err = iommu_device_register(&obj->iommu, &omap_iommu_ops, &pdev->dev);
if (err)
goto out_sysfs;
}