drm/amdgpu: use adev_to_drm for consistency when accessing drm_device
[sfrench/cifs-2.6.git] / drivers / gpu / drm / amd / amdgpu / amdgpu_gart.c
index d7e4f4660acf230a4d8d600e3d4ffbbe47da977e..d3e4203f62174edc4144b50fb93d609c6ef91acb 100644 (file)
@@ -238,7 +238,7 @@ int amdgpu_gart_unbind(struct amdgpu_device *adev, uint64_t offset,
                return -EINVAL;
        }
 
-       if (!drm_dev_enter(&adev->ddev, &idx))
+       if (!drm_dev_enter(adev_to_drm(adev), &idx))
                return 0;
 
        t = offset / AMDGPU_GPU_PAGE_SIZE;
@@ -289,7 +289,7 @@ int amdgpu_gart_map(struct amdgpu_device *adev, uint64_t offset,
                return -EINVAL;
        }
 
-       if (!drm_dev_enter(&adev->ddev, &idx))
+       if (!drm_dev_enter(adev_to_drm(adev), &idx))
                return 0;
 
        t = offset / AMDGPU_GPU_PAGE_SIZE;