Commit e63cfb5f authored by Robin Murphy's avatar Robin Murphy Committed by Joerg Roedel
Browse files

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: default avatarLu Baolu <baolu.lu@linux.intel.com>
Signed-off-by: default avatarRobin Murphy <robin.murphy@arm.com>
Link: https://lore.kernel.org/r/5fe4b0ce22f676f435d332f2b2828dc7ef848a19.1655822151.git.robin.murphy@arm.com


Signed-off-by: default avatarJoerg Roedel <jroedel@suse.de>
parent 0bec0557
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -272,7 +272,7 @@ static int __iommu_probe_device(struct device *dev, struct list_head *group_list

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);