From: Robin Murphy Date: Wed, 8 Jun 2022 11:46:33 +0000 (+0100) Subject: RDMA/usnic: Use device_iommu_capable() X-Git-Tag: v6.1-rc5~703^2~83 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=d56e336e8444970964b6e8d1bd4536f505256c41;p=platform%2Fkernel%2Flinux-starfive.git RDMA/usnic: Use device_iommu_capable() Use the new interface to check the capability for our device specifically. Link: https://lore.kernel.org/r/96ffe7050da0aa0ad6bce4705c3532f3ecaf32e3.1654688682.git.robin.murphy@arm.com Signed-off-by: Robin Murphy Signed-off-by: Leon Romanovsky --- diff --git a/drivers/infiniband/hw/usnic/usnic_uiom.c b/drivers/infiniband/hw/usnic/usnic_uiom.c index e212929..67a1b45 100644 --- a/drivers/infiniband/hw/usnic/usnic_uiom.c +++ b/drivers/infiniband/hw/usnic/usnic_uiom.c @@ -482,7 +482,7 @@ int usnic_uiom_attach_dev_to_pd(struct usnic_uiom_pd *pd, struct device *dev) if (err) goto out_free_dev; - if (!iommu_capable(dev->bus, IOMMU_CAP_CACHE_COHERENCY)) { + if (!device_iommu_capable(dev, IOMMU_CAP_CACHE_COHERENCY)) { usnic_err("IOMMU of %s does not support cache coherency\n", dev_name(dev)); err = -EINVAL;