Messages in this thread Patch in this message | | | From | Daniel Lezcano <> | Subject | [PATCH 4/6] thermal: power_allocator: Remove useless test | Date | Sat, 11 Apr 2020 00:12:33 +0200 |
| |
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(-)
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++; -- 2.17.1
| |