Skip to content

Commit e63cfb5

Browse files
rmurphy-armjoergroedel
authored andcommitted
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>
1 parent 0bec055 commit e63cfb5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

drivers/iommu/iommu.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list
272272

273273
int iommu_probe_device(struct device *dev)
274274
{
275-
const struct iommu_ops *ops = dev->bus->iommu_ops;
275+
const struct iommu_ops *ops;
276276
struct iommu_group *group;
277277
int ret;
278278

@@ -313,6 +313,7 @@ int iommu_probe_device(struct device *dev)
313313
mutex_unlock(&group->mutex);
314314
iommu_group_put(group);
315315

316+
ops = dev_iommu_ops(dev);
316317
if (ops->probe_finalize)
317318
ops->probe_finalize(dev);
318319

0 commit comments

Comments
 (0)