From d0735db50652052cca1b8436f3958484c1fcda7c Mon Sep 17 00:00:00 2001 From: Hyeonseong Gil Date: Thu, 24 Mar 2016 11:12:19 +0900 Subject: [PATCH] [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 --- drivers/thermal/power_allocator.c | 3 +++ 1 file changed, 3 insertions(+) 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])) -- 2.20.1