diff options
Diffstat (limited to 'drivers/acpi/thermal.c')
-rw-r--r-- | drivers/acpi/thermal.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/drivers/acpi/thermal.c b/drivers/acpi/thermal.c index 8470771e5eae..a33821ca3895 100644 --- a/drivers/acpi/thermal.c +++ b/drivers/acpi/thermal.c | |||
@@ -723,9 +723,19 @@ static int thermal_get_trend(struct thermal_zone_device *thermal, | |||
723 | return -EINVAL; | 723 | return -EINVAL; |
724 | 724 | ||
725 | if (type == THERMAL_TRIP_ACTIVE) { | 725 | if (type == THERMAL_TRIP_ACTIVE) { |
726 | /* aggressive active cooling */ | 726 | unsigned long trip_temp; |
727 | *trend = THERMAL_TREND_RAISING; | 727 | unsigned long temp = KELVIN_TO_MILLICELSIUS(tz->temperature, |
728 | return 0; | 728 | tz->kelvin_offset); |
729 | if (thermal_get_trip_temp(thermal, trip, &trip_temp)) | ||
730 | return -EINVAL; | ||
731 | |||
732 | if (temp > trip_temp) { | ||
733 | *trend = THERMAL_TREND_RAISING; | ||
734 | return 0; | ||
735 | } else { | ||
736 | /* Fall back on default trend */ | ||
737 | return -EINVAL; | ||
738 | } | ||
729 | } | 739 | } |
730 | 740 | ||
731 | /* | 741 | /* |