Message ID | 20200410221236.6484-5-daniel.lezcano@linaro.org (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Zhang Rui |
Headers | show |
Series | None | expand |
diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c index f8e4219cf5de..fd7c8de02250 100644 --- a/drivers/thermal/power_allocator.c +++ b/drivers/thermal/power_allocator.c @@ -427,11 +427,10 @@ static int allocate_power(struct thermal_zone_device *tz, if (instance->trip != trip_max_desired_temperature) continue; - if (!cdev_is_power_actor(instance->cdev)) + if (power_actor_set_power(instance->cdev, instance, + granted_power[i])) continue; - power_actor_set_power(instance->cdev, instance, - granted_power[i]); total_granted_power += granted_power[i]; i++;
The function power_actor_set_power() does check if the specified cooling device is a power actor. Call the function and handle the return code like what do the other calls to power_actor_* functions. Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org> --- drivers/thermal/power_allocator.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-)