diff options
| author | Robin Murphy <[email protected]> | 2021-04-01 13:56:26 +0000 |
|---|---|---|
| committer | Joerg Roedel <[email protected]> | 2021-04-16 15:20:45 +0000 |
| commit | 2d471b20c55e13c98d1dba413bf2de618e89cdac (patch) | |
| tree | fe16cf7ce737c7c60d0cd414199cab0bfb4aea47 /drivers/iommu/intel/dmar.c | |
| parent | iommu: Statically set module owner (diff) | |
| download | kernel-2d471b20c55e13c98d1dba413bf2de618e89cdac.tar.gz kernel-2d471b20c55e13c98d1dba413bf2de618e89cdac.zip | |
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 <[email protected]>
Signed-off-by: Robin Murphy <[email protected]>
Link: https://lore.kernel.org/r/ab001b87c533b6f4db71eb90db6f888953986c36.1617285386.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <[email protected]>
Diffstat (limited to 'drivers/iommu/intel/dmar.c')
| -rw-r--r-- | drivers/iommu/intel/dmar.c | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/iommu/intel/dmar.c b/drivers/iommu/intel/dmar.c index 6971397805f3..1757ac1e1623 100644 --- a/drivers/iommu/intel/dmar.c +++ b/drivers/iommu/intel/dmar.c @@ -1140,9 +1140,7 @@ static int alloc_iommu(struct dmar_drhd_unit *drhd) if (err) goto err_unmap; - iommu_device_set_ops(&iommu->iommu, &intel_iommu_ops); - - err = iommu_device_register(&iommu->iommu); + err = iommu_device_register(&iommu->iommu, &intel_iommu_ops, NULL); if (err) goto err_unmap; } |
