summaryrefslogtreecommitdiffstats
path: root/drivers/iommu/virtio-iommu.c
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-08-01 18:51:42 +0200
committerJoerg Roedel <jroedel@suse.de>2022-09-07 10:38:22 +0200
commit0c9ccaf24efa5b8f728445272ebc84754da2a512 (patch)
tree3ccbb66b6a5174ea1e97a55259876420a3ddefde /drivers/iommu/virtio-iommu.c
parentLinux 6.0-rc4 (diff)
downloadlinux-0c9ccaf24efa5b8f728445272ebc84754da2a512.tar.xz
linux-0c9ccaf24efa5b8f728445272ebc84754da2a512.zip
iommu/virtio: Do not dereference fwnode in struct device
In order to make the underneath API easier to change in the future, prevent users from dereferencing fwnode from struct device. Instead, use the specific device_match_fwnode() API for that. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Jean-Philippe Brucker <jean-philippe@linaro.org> Link: https://lore.kernel.org/r/20220801165142.20898-1-andriy.shevchenko@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu/virtio-iommu.c')
-rw-r--r--drivers/iommu/virtio-iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/virtio-iommu.c b/drivers/iommu/virtio-iommu.c
index 08eeafc9529f..9fe723f55213 100644
--- a/drivers/iommu/virtio-iommu.c
+++ b/drivers/iommu/virtio-iommu.c
@@ -925,7 +925,7 @@ static struct virtio_driver virtio_iommu_drv;
static int viommu_match_node(struct device *dev, const void *data)
{
- return dev->parent->fwnode == data;
+ return device_match_fwnode(dev->parent, data);
}
static struct viommu_dev *viommu_get_by_fwnode(struct fwnode_handle *fwnode)