summaryrefslogtreecommitdiffstats
path: root/drivers/thermal/gov_power_allocator.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/thermal/gov_power_allocator.c')
-rw-r--r--drivers/thermal/gov_power_allocator.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/thermal/gov_power_allocator.c b/drivers/thermal/gov_power_allocator.c
index ab0be26f0816..eb8c9afadf19 100644
--- a/drivers/thermal/gov_power_allocator.c
+++ b/drivers/thermal/gov_power_allocator.c
@@ -96,7 +96,10 @@ static u32 estimate_sustainable_power(struct thermal_zone_device *tz)
if (instance->trip != params->trip_max_desired_temperature)
continue;
- if (power_actor_get_min_power(cdev, &min_power))
+ if (!cdev_is_power_actor(cdev))
+ continue;
+
+ if (cdev->ops->state2power(cdev, instance->upper, &min_power))
continue;
sustainable_power += min_power;
@@ -398,7 +401,8 @@ static int allocate_power(struct thermal_zone_device *tz,
weighted_req_power[i] = frac_to_int(weight * req_power[i]);
- if (power_actor_get_max_power(cdev, &max_power[i]))
+ if (cdev->ops->state2power(cdev, instance->lower,
+ &max_power[i]))
continue;
total_req_power += req_power[i];