iommu/msm: Use dev_iommu_priv_get/set()
authorJoerg Roedel <jroedel@suse.de>
Thu, 25 Jun 2020 13:08:26 +0000 (15:08 +0200)
committerJoerg Roedel <jroedel@suse.de>
Tue, 30 Jun 2020 09:59:48 +0000 (11:59 +0200)
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 <jroedel@suse.de>
Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com>
Link: https://lore.kernel.org/r/20200625130836.1916-4-joro@8bytes.org
drivers/iommu/msm_iommu.c

index 3d8a635..f773cc8 100644 (file)
@@ -593,14 +593,14 @@ static void insert_iommu_master(struct device *dev,
                                struct msm_iommu_dev **iommu,
                                struct of_phandle_args *spec)
 {
-       struct msm_iommu_ctx_dev *master = dev->archdata.iommu;
+       struct msm_iommu_ctx_dev *master = dev_iommu_priv_get(dev);
        int sid;
 
        if (list_empty(&(*iommu)->ctx_list)) {
                master = kzalloc(sizeof(*master), GFP_ATOMIC);
                master->of_node = dev->of_node;
                list_add(&master->list, &(*iommu)->ctx_list);
-               dev->archdata.iommu = master;
+               dev_iommu_priv_set(dev, master);
        }
 
        for (sid = 0; sid < master->num_mids; sid++)