diff options
author | Guchun Chen <guchun.chen@amd.com> | 2023-03-10 07:59:32 +0300 |
---|---|---|
committer | Alex Deucher <alexander.deucher@amd.com> | 2023-03-14 00:27:48 +0300 |
commit | 6ab68650a10e89dc351cb12b42a89b8789126c13 (patch) | |
tree | b075f5e85b73241f59de2550b69996c36d6626bd /drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | |
parent | 53e9d836ea7fa0bfe9950ffb92d50811a5e69f01 (diff) | |
download | linux-6ab68650a10e89dc351cb12b42a89b8789126c13.tar.xz |
drm/amdgpu: use drm_device pointer directly rather than convert again
The convert from adev is redundant.
Signed-off-by: Guchun Chen <guchun.chen@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_device.c')
-rw-r--r-- | drivers/gpu/drm/amd/amdgpu/amdgpu_device.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c index a6c91794e0d6..8fdd372f2437 100644 --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_device.c @@ -5588,7 +5588,7 @@ int amdgpu_device_baco_enter(struct drm_device *dev) struct amdgpu_device *adev = drm_to_adev(dev); struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); - if (!amdgpu_device_supports_baco(adev_to_drm(adev))) + if (!amdgpu_device_supports_baco(dev)) return -ENOTSUPP; if (ras && adev->ras_enabled && @@ -5604,7 +5604,7 @@ int amdgpu_device_baco_exit(struct drm_device *dev) struct amdgpu_ras *ras = amdgpu_ras_get_context(adev); int ret = 0; - if (!amdgpu_device_supports_baco(adev_to_drm(adev))) + if (!amdgpu_device_supports_baco(dev)) return -ENOTSUPP; ret = amdgpu_dpm_baco_exit(adev); |