summaryrefslogtreecommitdiffstats
path: root/drivers/iommu
diff options
context:
space:
mode:
authorAndy Shevchenko <andriy.shevchenko@linux.intel.com>2022-08-01 19:47:58 +0300
committerJoerg Roedel <jroedel@suse.de>2022-09-07 10:37:28 +0200
commit927d8f272e4f2ff20acbf3d4c21119b0e9d17cc2 (patch)
treea9150d0957f317fe8419e46a9fee1f79674ebf89 /drivers/iommu
parent7e18e42e4b280c85b76967a9106a13ca61c16179 (diff)
downloadlinux-stable-927d8f272e4f2ff20acbf3d4c21119b0e9d17cc2.tar.gz
linux-stable-927d8f272e4f2ff20acbf3d4c21119b0e9d17cc2.tar.bz2
linux-stable-927d8f272e4f2ff20acbf3d4c21119b0e9d17cc2.zip
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 <andriy.shevchenko@linux.intel.com> Reviewed-by: Robin Murphy <robin.murphy@arm.com> Link: https://lore.kernel.org/r/20220801164758.20664-1-andriy.shevchenko@linux.intel.com Signed-off-by: Joerg Roedel <jroedel@suse.de>
Diffstat (limited to 'drivers/iommu')
-rw-r--r--drivers/iommu/iommu.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/iommu/iommu.c b/drivers/iommu/iommu.c
index 780fb7071577..31b5f4ceb2e9 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);