On 4/30/20 8:32 AM, Zhang Rui wrote:
For a disabled thermal zone, thermal_zone_device_update() should do
nothing but cancelling the polling timer.
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Reviewed-by: Bartlomiej Zolnierkiewicz <redacted>
Best regards,
--
Bartlomiej Zolnierkiewicz
Samsung R&D Institute Poland
Samsung Electronics
quoted hunk ↗ jump to hunk
---
drivers/thermal/thermal_core.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 04a16a9..5f7a867 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -508,7 +508,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
int count;
if (should_stop_polling(tz))
- return;
+ goto update_polling;
if (atomic_read(&in_suspend))
return;
@@ -525,6 +525,7 @@ void thermal_zone_device_update(struct thermal_zone_device *tz,
for (count = 0; count < tz->trips; count++)
handle_thermal_trip(tz, count);
+update_polling:
/*
* Alright, we handled all the trips successfully.
* So, start monitoring again.