thermal: disable polling if passive_delay and polling_delay are both unset
PATCH 10/12 thermal: disable polling if passive_delay and polling_delay are both unset
From: Frans Pop <[email protected]>
Otherwise polling will continue for the thermal zone even when it is no longer needed, for example because forced passive cooling was disabled.
Signed-off-by Frans Pop <[email protected]>
Acked-by Matthew Garrett <[email protected]>
Cc Zhang Rui <[email protected]>
Cc Len Brown <[email protected]>
Signed-off-by Andrew Morton <[email protected]>
---
drivers/thermal/thermal_sys.c | 2 ++ 1 file changed, 2 insertions(+)
drivers/thermal/thermal_sys.c renamed from drivers/thermal/thermal_sys.c~thermal-disable-polling-if-passive_delay-and-polling_delay-are-both-unset +2 -0
@@ -1019,6 +1019,8 @@ void thermal_zone_device_update(struct tthermal_zone_device_set_polling (tz, tz->passive_delay); else if (tz->polling_delay) thermal_zone_device_set_polling(tz, tz->polling_delay); + else + thermal_zone_device_set_polling(tz, 0);mutex_unlock (&tz->lock); }EXPORT_SYMBOL (thermal_zone_device_update);
_