From: Robin Murphy Date: Wed, 8 Jun 2022 11:48:26 +0000 (+0100) Subject: vdpa: Use device_iommu_capable() X-Git-Tag: v6.1-rc5~611^2~81 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=366958a7fd7b541cba478e2866ef08f34e20471b;p=platform%2Fkernel%2Flinux-starfive.git vdpa: Use device_iommu_capable() Use the new interface to check the capability for our device specifically. Signed-off-by: Robin Murphy Message-Id: <548e316fa282ce513fabb991a4c4d92258062eb5.1654688822.git.robin.murphy@arm.com> Signed-off-by: Michael S. Tsirkin Acked-by: Jason Wang --- diff --git a/drivers/vhost/vdpa.c b/drivers/vhost/vdpa.c index 23dcbfd..250ad41 100644 --- a/drivers/vhost/vdpa.c +++ b/drivers/vhost/vdpa.c @@ -1076,7 +1076,7 @@ static int vhost_vdpa_alloc_domain(struct vhost_vdpa *v) if (!bus) return -EFAULT; - if (!iommu_capable(bus, IOMMU_CAP_CACHE_COHERENCY)) + if (!device_iommu_capable(dma_dev, IOMMU_CAP_CACHE_COHERENCY)) return -ENOTSUPP; v->domain = iommu_domain_alloc(bus);