From: Frans Pop Date: Mon, 26 Oct 2009 07:39:04 +0000 (+0100) Subject: thermal: disable polling if passive_delay and polling_delay are both unset X-Git-Tag: v2.6.33-rc1~47^2~12^2 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=3767cb54ac718eb049d2a29f7a575ab923550ba5;p=karo-tx-linux.git thermal: disable polling if passive_delay and polling_delay are both unset 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 Acked-by: Matthew Garrett Acked-by: Zhang Rui Signed-off-by: Andrew Morton Signed-off-by: Len Brown --- diff --git a/drivers/thermal/thermal_sys.c b/drivers/thermal/thermal_sys.c index 663c2fdba775..3bc72ea57e09 100644 --- a/drivers/thermal/thermal_sys.c +++ b/drivers/thermal/thermal_sys.c @@ -1019,6 +1019,8 @@ void thermal_zone_device_update(struct thermal_zone_device *tz) thermal_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);