summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom St Denis <tom.stdenis@amd.com>2017-09-12 09:51:36 -0400
committerAlex Deucher <alexander.deucher@amd.com>2017-09-13 12:10:08 -0400
commit3efabd5eda4a47eb5dbe0a6f0e7f700252e43965 (patch)
treeb6e6558f5eca5437591f4fb8b2d4d84e7015635f
parent8b39f031b7a65e06d5de99170fa056ea14eaca54 (diff)
downloadlwn-3efabd5eda4a47eb5dbe0a6f0e7f700252e43965.tar.gz
lwn-3efabd5eda4a47eb5dbe0a6f0e7f700252e43965.zip
drm/amd/powerplay: Tidy up smu7_fan_ctrl_get_fan_speed_rpm()
Signed-off-by: Tom St Denis <tom.stdenis@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
index a491f1201fda..be8367997e75 100644
--- a/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
+++ b/drivers/gpu/drm/amd/powerplay/hwmgr/smu7_thermal.c
@@ -86,8 +86,7 @@ int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed)
uint32_t crystal_clock_freq;
if (hwmgr->thermal_controller.fanInfo.bNoFan ||
- (hwmgr->thermal_controller.fanInfo.
- ucTachometerPulsesPerRevolution == 0))
+ !hwmgr->thermal_controller.fanInfo.ucTachometerPulsesPerRevolution)
return -ENODEV;
tach_period = PHM_READ_VFPF_INDIRECT_FIELD(hwmgr->device, CGS_IND_REG__SMC,