Skip to content

Commit 0c9ccaf

Browse files
andy-shevjoergroedel
authored andcommitted
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>
1 parent 7e18e42 commit 0c9ccaf

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

drivers/iommu/virtio-iommu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -925,7 +925,7 @@ static struct virtio_driver virtio_iommu_drv;
925925

926926
static int viommu_match_node(struct device *dev, const void *data)
927927
{
928-
return dev->parent->fwnode == data;
928+
return device_match_fwnode(dev->parent, data);
929929
}
930930

931931
static struct viommu_dev *viommu_get_by_fwnode(struct fwnode_handle *fwnode)

0 commit comments

Comments
 (0)