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>
This commit is contained in:
parent
53e9d836ea
commit
6ab68650a1
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user