summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorPraveen Chidambaram <pchidamb@codeaurora.org>2013-09-12 16:39:44 -0600
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 11:08:19 -0700
commit6ed698c7593abb1fcc8f4ad96110a0eaaf8154fd (patch)
treeec5cc83ba17432d7c93f3ba13a335353ed316a6b /include/linux
parent655ad701452d047b4fa260fe2ad96e74187554b4 (diff)
thermal: Fix sensor thresholds not accounted correctly
Sensor threshold min and max are calculated to be binding around the current temp, but they fail if there no thresholds available with the min < curr_temp and the max > curr_temp. Fix negative temperatures handling. Change-Id: I124d2a9249f705d41469b8e0efffe2dfdf05e292 Signed-off-by: Praveen Chidambaram <pchidamb@codeaurora.org>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/thermal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/include/linux/thermal.h b/include/linux/thermal.h
index 03eec380f7f8..2bab7a26db20 100644
--- a/include/linux/thermal.h
+++ b/include/linux/thermal.h
@@ -154,7 +154,7 @@ struct thermal_attr {
};
struct sensor_threshold {
- int temp;
+ long temp;
enum thermal_trip_type trip;
int (*notify)(enum thermal_trip_type type, int temp, void *data);
void *data;
@@ -164,8 +164,8 @@ struct sensor_threshold {
struct sensor_info {
uint32_t sensor_id;
struct thermal_zone_device *tz;
- int threshold_min;
- int threshold_max;
+ long threshold_min;
+ long threshold_max;
int max_idx;
int min_idx;
struct list_head sensor_list;
@@ -450,7 +450,7 @@ int sensor_get_id(char *name);
int sensor_set_trip(uint32_t sensor_id, struct sensor_threshold *threshold);
int sensor_cancel_trip(uint32_t sensor_id, struct sensor_threshold *threshold);
int thermal_sensor_trip(struct thermal_zone_device *tz,
- enum thermal_trip_type trip, unsigned long temp);
+ enum thermal_trip_type trip, long temp);
#else
static inline bool cdev_is_power_actor(struct thermal_cooling_device *cdev)