Skip to content

Commit

Permalink
iommu: Do not dereference fwnode in struct device
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Andy Shevchenko authored and Joerg Roedel committed Sep 7, 2022
1 parent 7e18e42 commit 927d8f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/iommu/iommu.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 927d8f2

Please sign in to comment.