diff options
author | Robin Murphy <robin.murphy@arm.com> | 2022-06-21 16:14:25 +0100 |
---|---|---|
committer | Joerg Roedel <jroedel@suse.de> | 2022-07-06 12:55:53 +0200 |
commit | e63cfb5faac57056eeed22d78ee1c8f7a4ddbef2 (patch) | |
tree | c38d8c575009c360fe7f76ebb5489f88e479d3d6 /drivers/iommu | |
parent | 0bec05574d13ed7e8643733fe5dccbd0c86604d2 (diff) | |
download | linux-e63cfb5faac57056eeed22d78ee1c8f7a4ddbef2.tar.gz linux-e63cfb5faac57056eeed22d78ee1c8f7a4ddbef2.tar.bz2 linux-e63cfb5faac57056eeed22d78ee1c8f7a4ddbef2.zip |
iommu: Use dev_iommu_ops() for probe_finalize
The ->probe_finalize hook only runs after ->probe_device succeeds,
so we can move that over to the new dev_iommu_ops() as well.
Reviewed-by: Lu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: Robin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/5fe4b0ce22f676f435d332f2b2828dc7ef848a19.1655822151.git.robin.murphy@arm.com
Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r-- | drivers/iommu/iommu.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index f46431ac49e1..862c3f61b7de 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -272,7 +272,7 @@ err_free: int iommu_probe_device(struct device *dev) { - const struct iommu_ops *ops = dev->bus->iommu_ops; + const struct iommu_ops *ops; struct iommu_group *group; int ret; @@ -313,6 +313,7 @@ int iommu_probe_device(struct device *dev) mutex_unlock(&group->mutex); iommu_group_put(group); + ops = dev_iommu_ops(dev); if (ops->probe_finalize) ops->probe_finalize(dev); |