Merge tag 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/rdma/rdma
[linux-2.6-microblaze.git] / drivers / iommu / tegra-gart.c
index 5fbdff6..fac7202 100644 (file)
@@ -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;