aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin Murphy <[email protected]>2022-06-24 18:59:35 +0100
committerAlex Williamson <[email protected]>2022-06-27 13:23:32 -0600
commit3b498b6656214d499d57f1e4935448821d0febf9 (patch)
treebd037300f129fb602e146c959bb5d302e690503f
parenteed20c782aea57b7efb42af2905dc381268b21e9 (diff)
vfio: Use device_iommu_capable()
Use the new interface to check the capabilities for our device specifically. Reviewed-by: Lu Baolu <[email protected]> Signed-off-by: Robin Murphy <[email protected]> Reviewed-by: Kevin Tian <[email protected]> Reviewed-by: Jason Gunthorpe <[email protected]> Link: https://lore.kernel.org/r/4ea5eb64246f1ee188d1a61c3e93b37756932eb7.1656092606.git.robin.murphy@arm.com Signed-off-by: Alex Williamson <[email protected]>
-rw-r--r--drivers/vfio/vfio.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/vfio/vfio.c b/drivers/vfio/vfio.c
index 61e71c1154be..4c06b571eaba 100644
--- a/drivers/vfio/vfio.c
+++ b/drivers/vfio/vfio.c
@@ -605,7 +605,7 @@ int vfio_register_group_dev(struct vfio_device *device)
* VFIO always sets IOMMU_CACHE because we offer no way for userspace to
* restore cache coherency.
*/
- if (!iommu_capable(device->dev->bus, IOMMU_CAP_CACHE_COHERENCY))
+ if (!device_iommu_capable(device->dev, IOMMU_CAP_CACHE_COHERENCY))
return -EINVAL;
return __vfio_register_dev(device,