Skip to content

Commit be568d6

Browse files
committed
iommu/renesas: Use accessor functions for iommu private data
Make use of dev_iommu_priv_set/get() functions. Signed-off-by: Joerg Roedel <[email protected]> Reviewed-by: Jean-Philippe Brucker <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent c84500a commit be568d6

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

drivers/iommu/ipmmu-vmsa.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,7 @@ static struct ipmmu_vmsa_domain *to_vmsa_domain(struct iommu_domain *dom)
8989

9090
static struct ipmmu_vmsa_device *to_ipmmu(struct device *dev)
9191
{
92-
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
93-
94-
return fwspec ? fwspec->iommu_priv : NULL;
92+
return dev_iommu_priv_get(dev);
9593
}
9694

9795
#define TLB_LOOP_TIMEOUT 100 /* 100us */
@@ -727,14 +725,13 @@ static phys_addr_t ipmmu_iova_to_phys(struct iommu_domain *io_domain,
727725
static int ipmmu_init_platform_device(struct device *dev,
728726
struct of_phandle_args *args)
729727
{
730-
struct iommu_fwspec *fwspec = dev_iommu_fwspec_get(dev);
731728
struct platform_device *ipmmu_pdev;
732729

733730
ipmmu_pdev = of_find_device_by_node(args->np);
734731
if (!ipmmu_pdev)
735732
return -ENODEV;
736733

737-
fwspec->iommu_priv = platform_get_drvdata(ipmmu_pdev);
734+
dev_iommu_priv_set(dev, platform_get_drvdata(ipmmu_pdev));
738735

739736
return 0;
740737
}

0 commit comments

Comments
 (0)