diff options
Diffstat (limited to 'common/thermal.c')
-rw-r--r-- | common/thermal.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/common/thermal.c b/common/thermal.c index 3f570be058..6b4f3fa355 100644 --- a/common/thermal.c +++ b/common/thermal.c @@ -188,14 +188,13 @@ static void thermal_process(void) if (!temp_sensor_powered(i)) continue; - cur_temp = temp_sensor_read(i); - - /* Sensor failure. */ - if (cur_temp == -1) { + if (temp_sensor_read(i, &cur_temp)) { + /* Sensor failure. */ if (flag & THERMAL_CONFIG_WARNING_ON_FAIL) smi_sensor_failure_warning(); continue; } + for (j = 0; j < THRESHOLD_COUNT + THERMAL_FAN_STEPS; ++j) update_and_check_stat(cur_temp, i, j); } |