From: Guchun Chen Date: Thu, 25 Aug 2022 07:44:46 +0000 (+0800) Subject: drm/amdgpu: use adev_to_drm to get drm device X-Git-Tag: v6.1-rc1~159^2~15^2~121 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a79f56d191c4f621eee85979d6e77435fb8383b5;p=thirdparty%2Fkernel%2Flinux.git drm/amdgpu: use adev_to_drm to get drm device adev_to_drm is used everywhere in amdgpu code, so modify it to keep consistency. Signed-off-by: Guchun Chen Reviewed-by: Christian König Signed-off-by: Alex Deucher --- diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c index 8ee4e8491f391..6ea8980c8ad73 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c @@ -402,7 +402,7 @@ static void amdgpu_ctx_fini(struct kref *ref) } } - if (drm_dev_enter(&adev->ddev, &idx)) { + if (drm_dev_enter(adev_to_drm(adev), &idx)) { amdgpu_ctx_set_stable_pstate(ctx, ctx->stable_pstate); drm_dev_exit(idx); }