summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/of_iommu.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2018-11-30 14:29:01 +0100
committerJoerg Roedel <jroedel@suse.de>2018-12-17 10:38:43 +0100
commit170ecbd5ff09aa9c8c1025a8563f76e01a24bb50 (patch)
tree72d2f0d0fd79c236346b4bf32c288d33fc69b674 /drivers/iommu/of_iommu.c
parentdbba197edf32209d110727a02d3a91de4c88520f (diff)
downloadlinux-stable-170ecbd5ff09aa9c8c1025a8563f76e01a24bb50.tar.gz
linux-stable-170ecbd5ff09aa9c8c1025a8563f76e01a24bb50.tar.bz2
linux-stable-170ecbd5ff09aa9c8c1025a8563f76e01a24bb50.zip
iommu/of: Use device_iommu_mapped()
Use Use device_iommu_mapped() to check if the device is already mapped by an IOMMU. Acked-by: Robin Murphy <robin.murphy@arm.com> Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/of_iommu.c')
-rw-r--r--drivers/iommu/of_iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/of_iommu.c b/drivers/iommu/of_iommu.c
index 8b071f3dcf9e..dbe73456f1a1 100644
--- a/drivers/iommu/of_iommu.c
+++ b/drivers/iommu/of_iommu.c
@@ -224,7 +224,7 @@ const struct iommu_ops *of_iommu_configure(struct device *dev,
* If we have reason to believe the IOMMU driver missed the initial
* add_device callback for dev, replay it to get things in order.
*/
- if (ops && ops->add_device && dev->bus && !dev->iommu_group)
+ if (ops && ops->add_device && dev->bus && !device_iommu_mapped(dev))
err = ops->add_device(dev);
/* Ignore all other errors apart from EPROBE_DEFER */