[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20200410221236.6484-5-daniel.lezcano@linaro.org>
Date: Sat, 11 Apr 2020 00:12:33 +0200
From: Daniel Lezcano <daniel.lezcano@...aro.org>
To: daniel.lezcano@...aro.org, rui.zhang@...el.com
Cc: amit.kucheria@...durent.com, linux-kernel@...r.kernel.org,
linux-pm@...r.kernel.org (open list:THERMAL)
Subject: [PATCH 4/6] thermal: power_allocator: Remove useless test
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@...aro.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
Powered by blists - more mailing lists