diff options
Diffstat (limited to 'drivers/thermal/fair_share.c')
-rw-r--r-- | drivers/thermal/fair_share.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/drivers/thermal/fair_share.c b/drivers/thermal/fair_share.c index 944ba2f340c8..6e0a3fbfae86 100644 --- a/drivers/thermal/fair_share.c +++ b/drivers/thermal/fair_share.c | |||
@@ -23,6 +23,7 @@ | |||
23 | */ | 23 | */ |
24 | 24 | ||
25 | #include <linux/thermal.h> | 25 | #include <linux/thermal.h> |
26 | #include <trace/events/thermal.h> | ||
26 | 27 | ||
27 | #include "thermal_core.h" | 28 | #include "thermal_core.h" |
28 | 29 | ||
@@ -34,6 +35,7 @@ static int get_trip_level(struct thermal_zone_device *tz) | |||
34 | { | 35 | { |
35 | int count = 0; | 36 | int count = 0; |
36 | unsigned long trip_temp; | 37 | unsigned long trip_temp; |
38 | enum thermal_trip_type trip_type; | ||
37 | 39 | ||
38 | if (tz->trips == 0 || !tz->ops->get_trip_temp) | 40 | if (tz->trips == 0 || !tz->ops->get_trip_temp) |
39 | return 0; | 41 | return 0; |
@@ -43,6 +45,16 @@ static int get_trip_level(struct thermal_zone_device *tz) | |||
43 | if (tz->temperature < trip_temp) | 45 | if (tz->temperature < trip_temp) |
44 | break; | 46 | break; |
45 | } | 47 | } |
48 | |||
49 | /* | ||
50 | * count > 0 only if temperature is greater than first trip | ||
51 | * point, in which case, trip_point = count - 1 | ||
52 | */ | ||
53 | if (count > 0) { | ||
54 | tz->ops->get_trip_type(tz, count - 1, &trip_type); | ||
55 | trace_thermal_zone_trip(tz, count - 1, trip_type); | ||
56 | } | ||
57 | |||
46 | return count; | 58 | return count; |
47 | } | 59 | } |
48 | 60 | ||