From: Andy Shevchenko Date: Mon, 1 Aug 2022 16:47:58 +0000 (+0300) Subject: iommu: Do not dereference fwnode in struct device X-Git-Tag: v6.1-rc1~78^2^8~30 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=927d8f272e4f2ff20acbf3d4c21119b0e9d17cc2;p=thirdparty%2Flinux.git iommu: 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 dev_fwnode() API for that. Signed-off-by: Andy Shevchenko Reviewed-by: Robin Murphy Link: https://lore.kernel.org/r/20220801164758.20664-1-andriy.shevchenko@linux.intel.com Signed-off-by: Joerg Roedel --- diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c index 780fb70715770..31b5f4ceb2e95 100644 --- a/drivers/iommu/iommu.c +++ b/drivers/iommu/iommu.c @@ -173,7 +173,7 @@ int iommu_device_register(struct iommu_device *iommu, iommu->ops = ops; if (hwdev) - iommu->fwnode = hwdev->fwnode; + iommu->fwnode = dev_fwnode(hwdev); spin_lock(&iommu_device_lock); list_add_tail(&iommu->list, &iommu_device_list);