lkml.org 
[lkml]   [2020]   [Apr]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 4/6] thermal: power_allocator: Remove useless test
Date
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
\
 
 \ /
  Last update: 2020-04-11 00:13    [W:0.132 / U:0.416 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site