mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-29 02:19:54 -04:00
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>
This commit is contained in:
committed by
Joerg Roedel
parent
7e18e42e4b
commit
927d8f272e
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user