From: Hyeonseong Gil Date: Thu, 24 Mar 2016 02:12:19 +0000 (+0900) Subject: [COMMON] thermal: power_allocator: avoid req_power is 0 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=d0735db50652052cca1b8436f3958484c1fcda7c;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] thermal: power_allocator: avoid req_power is 0 In case only one actor belong to power_allocator, target frequency will be limited minium frequency when req_power(load) is 0. Change-Id: Iab369eb49c24daab9f4e64ba6adb4c129b3c37b7 Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index b4d3116cfdaf..9e0f02427b10 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -403,6 +403,9 @@ static int allocate_power(struct thermal_zone_device *tz, else weight = instance->weight; + if (req_power[i] == 0) + req_power[i] = 1; + weighted_req_power[i] = frac_to_int(weight * req_power[i]); if (power_actor_get_max_power(cdev, tz, &max_power[i]))