thermal/core: Rearm the monitoring only one time
authorDaniel Lezcano <daniel.lezcano@linaro.org>
Fri, 5 Aug 2022 15:38:30 +0000 (17:38 +0200)
committerDaniel Lezcano <daniel.lezcano@linaro.org>
Wed, 17 Aug 2022 12:09:39 +0000 (14:09 +0200)
commit9662756a9a1c34b3ee606dcddfda6a457f89b07f
treee9a005d99118da0f0bd28d5a47e7ef95444914c3
parente920209847c396ca243259160b7d10d0dae17b35
thermal/core: Rearm the monitoring only one time

The current code calls monitor_thermal_zone() inside the
handle_thermal_trip() function. But this one is called in a loop for
each trip point which means the monitoring is rearmed several times
for nothing (assuming there could be several passive and active trip
points).

Move the monitor_thermal_zone() function out of the
handle_thermal_trip() function and after the thermal trip loop, so the
timer will be disabled or rearmed one time.

Signed-off-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Link: https://lore.kernel.org/r/20220805153834.2510142-1-daniel.lezcano@linaro.org
drivers/thermal/thermal_core.c