Skip to content

Commit 8b9cc3b

Browse files
committed
iommu/rockchip: Use dev_iommu_priv_get/set()
Remove the use of dev->archdata.iommu and use the private per-device pointer provided by IOMMU core code instead. Signed-off-by: Joerg Roedel <[email protected]> Reviewed-by: Jerry Snitselaar <[email protected]> Link: https://lore.kernel.org/r/[email protected]
1 parent 97ea120 commit 8b9cc3b

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

drivers/iommu/rockchip-iommu.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -836,7 +836,7 @@ static size_t rk_iommu_unmap(struct iommu_domain *domain, unsigned long _iova,
836836

837837
static struct rk_iommu *rk_iommu_from_dev(struct device *dev)
838838
{
839-
struct rk_iommudata *data = dev->archdata.iommu;
839+
struct rk_iommudata *data = dev_iommu_priv_get(dev);
840840

841841
return data ? data->iommu : NULL;
842842
}
@@ -1059,7 +1059,7 @@ static struct iommu_device *rk_iommu_probe_device(struct device *dev)
10591059
struct rk_iommudata *data;
10601060
struct rk_iommu *iommu;
10611061

1062-
data = dev->archdata.iommu;
1062+
data = dev_iommu_priv_get(dev);
10631063
if (!data)
10641064
return ERR_PTR(-ENODEV);
10651065

@@ -1073,7 +1073,7 @@ static struct iommu_device *rk_iommu_probe_device(struct device *dev)
10731073

10741074
static void rk_iommu_release_device(struct device *dev)
10751075
{
1076-
struct rk_iommudata *data = dev->archdata.iommu;
1076+
struct rk_iommudata *data = dev_iommu_priv_get(dev);
10771077

10781078
device_link_del(data->link);
10791079
}
@@ -1100,7 +1100,7 @@ static int rk_iommu_of_xlate(struct device *dev,
11001100
iommu_dev = of_find_device_by_node(args->np);
11011101

11021102
data->iommu = platform_get_drvdata(iommu_dev);
1103-
dev->archdata.iommu = data;
1103+
dev_iommu_priv_set(dev, data);
11041104

11051105
platform_device_put(iommu_dev);
11061106

0 commit comments

Comments
 (0)