@@ -465,7 +465,7 @@ static void tegra_smmu_as_unprepare(struct tegra_smmu *smmu,
465
465
static int tegra_smmu_attach_dev (struct iommu_domain * domain ,
466
466
struct device * dev )
467
467
{
468
- struct tegra_smmu * smmu = dev -> archdata . iommu ;
468
+ struct tegra_smmu * smmu = dev_iommu_priv_get ( dev ) ;
469
469
struct tegra_smmu_as * as = to_smmu_as (domain );
470
470
struct device_node * np = dev -> of_node ;
471
471
struct of_phandle_args args ;
@@ -780,7 +780,7 @@ static struct iommu_device *tegra_smmu_probe_device(struct device *dev)
780
780
* supported by the Linux kernel, so abort after the
781
781
* first match.
782
782
*/
783
- dev -> archdata . iommu = smmu ;
783
+ dev_iommu_priv_set ( dev , smmu ) ;
784
784
785
785
break ;
786
786
}
@@ -797,7 +797,7 @@ static struct iommu_device *tegra_smmu_probe_device(struct device *dev)
797
797
798
798
static void tegra_smmu_release_device (struct device * dev )
799
799
{
800
- dev -> archdata . iommu = NULL ;
800
+ dev_iommu_priv_set ( dev , NULL ) ;
801
801
}
802
802
803
803
static const struct tegra_smmu_group_soc *
@@ -856,7 +856,7 @@ static struct iommu_group *tegra_smmu_group_get(struct tegra_smmu *smmu,
856
856
static struct iommu_group * tegra_smmu_device_group (struct device * dev )
857
857
{
858
858
struct iommu_fwspec * fwspec = dev_iommu_fwspec_get (dev );
859
- struct tegra_smmu * smmu = dev -> archdata . iommu ;
859
+ struct tegra_smmu * smmu = dev_iommu_priv_get ( dev ) ;
860
860
struct iommu_group * group ;
861
861
862
862
group = tegra_smmu_group_get (smmu , fwspec -> ids [0 ]);
0 commit comments