summaryrefslogtreecommitdiff
path: root/drivers/iommu/tegra-gart.c
diff options
context:
space:
mode:
authorJoerg Roedel <jroedel@suse.de>2020-06-25 16:08:29 +0300
committerJoerg Roedel <jroedel@suse.de>2020-06-30 12:59:48 +0300
commita5616e24609a2bb3dc6ea1ab360207fa1198c976 (patch)
tree85a5aaa54b8790eed0720f336163e873fc8d893d /drivers/iommu/tegra-gart.c
parent8b9cc3b71bfda8e7c273b8f0fd80a8860ed077ad (diff)
downloadlinux-a5616e24609a2bb3dc6ea1ab360207fa1198c976.tar.xz
iommu/tegra: 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 <jroedel@suse.de> Reviewed-by: Jerry Snitselaar <jsnitsel@redhat.com> Link: https://lore.kernel.org/r/20200625130836.1916-7-joro@8bytes.org
Diffstat (limited to 'drivers/iommu/tegra-gart.c')
-rw-r--r--drivers/iommu/tegra-gart.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/drivers/iommu/tegra-gart.c b/drivers/iommu/tegra-gart.c
index 5fbdff6ff41a..fac720273889 100644
--- a/drivers/iommu/tegra-gart.c
+++ b/drivers/iommu/tegra-gart.c
@@ -113,8 +113,8 @@ static int gart_iommu_attach_dev(struct iommu_domain *domain,
if (gart->active_domain && gart->active_domain != domain) {
ret = -EBUSY;
- } else if (dev->archdata.iommu != domain) {
- dev->archdata.iommu = domain;
+ } else if (dev_iommu_priv_get(dev) != domain) {
+ dev_iommu_priv_set(dev, domain);
gart->active_domain = domain;
gart->active_devices++;
}
@@ -131,8 +131,8 @@ static void gart_iommu_detach_dev(struct iommu_domain *domain,
spin_lock(&gart->dom_lock);
- if (dev->archdata.iommu == domain) {
- dev->archdata.iommu = NULL;
+ if (dev_iommu_priv_get(dev) == domain) {
+ dev_iommu_priv_set(dev, NULL);
if (--gart->active_devices == 0)
gart->active_domain = NULL;