drm/amd/powerplay: Fix code error for translating int type to bool type correctly

Fix code error to support value < 0 or > 1.

Signed-off-by: Chengming Gui <Jack.Gui@amd.com>
Reviewed-by: Hawking Zhang <hawking.zhang@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Chengming Gui 2019-05-21 15:57:21 +08:00 committed by Alex Deucher
parent fb2dbfd242
commit a751767708

View File

@ -348,7 +348,7 @@ static int smu_early_init(void *handle)
struct smu_context *smu = &adev->smu;
smu->adev = adev;
smu->pm_enabled = amdgpu_dpm;
smu->pm_enabled = !!amdgpu_dpm;
mutex_init(&smu->mutex);
return smu_set_funcs(adev);