From: Hyeonseong Gil Date: Thu, 11 Aug 2016 04:14:27 +0000 (+0900) Subject: [COMMON] thermal: power_allocator: Use last active point as switch_on X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=7c096006376169861502ab096b48eddac01e7ec8;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: power_allocator: Use last active point as switch_on If only one passive temperature exists, use the last active temperature below passive point as switch_on temperature. Change-Id: I57a8d94683881d10af5de30d57287159517ec364 Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index 40debd67bf68..eee892bdebc0 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -522,7 +522,7 @@ static void get_governor_trips(struct thermal_zone_device *tz, params->trip_max_desired_temperature = last_passive; } else if (found_first_passive) { params->trip_max_desired_temperature = params->trip_switch_on; - params->trip_switch_on = INVALID_TRIP; + params->trip_switch_on = last_active; } else { params->trip_switch_on = INVALID_TRIP; params->trip_max_desired_temperature = last_active;