summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Bernard <jbernard@codeaurora.org>2014-12-09 23:14:13 -0500
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:08:25 -0700
commit6a0a9b4bbfa90444635dd7fc6cab19fa96b9155b (patch)
treee7809f70c6089dd375ed87f8d6a1519cc32af3b9
parent5059c6fe7118762ed970fab9463d9885f1a1ca04 (diff)
thermal-core: Re-program the thresholds every time
Program the thresholds every time regardless so we guarantee the threshold is programmed. Previous code didn't reprogram the threshold if it was already believed to be set. This check can be wrong is some cornor cases. Change-Id: Ie94cb40302c585b2b779da57ad70d32cc2445c96 Signed-off-by: Jeff Bernard <jbernard@codeaurora.org>
-rw-r--r--drivers/thermal/thermal_core.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index db0164459bbe..61c87f65bc65 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -303,8 +303,7 @@ static int __update_sensor_thresholds(struct sensor_info *sensor)
sensor->sensor_id, max_of_low_thresh,
min_of_high_thresh);
- if ((min_of_high_thresh != sensor->threshold_max) &&
- (min_of_high_thresh != LONG_MAX)) {
+ if (min_of_high_thresh != LONG_MAX) {
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
sensor->max_idx, min_of_high_thresh);
if (ret) {
@@ -325,8 +324,7 @@ static int __update_sensor_thresholds(struct sensor_info *sensor)
goto update_done;
}
- if ((max_of_low_thresh != sensor->threshold_min) &&
- (max_of_low_thresh != LONG_MIN)) {
+ if (max_of_low_thresh != LONG_MIN) {
ret = sensor->tz->ops->set_trip_temp(sensor->tz,
sensor->min_idx, max_of_low_thresh);
if (ret) {