[PATCH 5/6] thermal: core: Move the call to thermal_cdev_udpate() to the power allocator

From: Daniel Lezcano
Date: Fri Apr 10 2020 - 18:13:17 EST


All the calls to the thermal_cdev_update() are in the governors except
one in the power_actor_set_power(). Move the update right after the
call to power_actor_set_power(), the function will be located in the
IPA governor.

Signed-off-by: Daniel Lezcano <daniel.lezcano@xxxxxxxxxx>
---
drivers/thermal/power_allocator.c | 2 ++
drivers/thermal/thermal_core.c | 1 -
2 files changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/thermal/power_allocator.c b/drivers/thermal/power_allocator.c
index fd7c8de02250..339442925dfe 100644
--- a/drivers/thermal/power_allocator.c
+++ b/drivers/thermal/power_allocator.c
@@ -433,6 +433,8 @@ static int allocate_power(struct thermal_zone_device *tz,

total_granted_power += granted_power[i];

+ thermal_cdev_update(instance->cdev);
+
i++;
}

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 052f77b0b0ef..a6b8c0240656 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -614,7 +614,6 @@ int power_actor_set_power(struct thermal_cooling_device *cdev,
return ret;

instance->target = state;
- thermal_cdev_update(cdev);

return 0;
}
--
2.17.1