thermal: Prevent polling from happening during system suspend

The thermal driver should use a freezable workqueue to schedule
polling to prevent thermal_zone_device_update() from being run
during system suspend, when the devices it relies on may be inactive.
Make it use the system freezable workqueue for this purpose.

Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: Len Brown <len.brown@intel.com>
This commit is contained in:
Rafael J. Wysocki 2011-11-06 14:21:38 +01:00 committed by Len Brown
parent 4505a2015f
commit 51e20d0e3a
1 changed files with 2 additions and 2 deletions

View File

@ -678,10 +678,10 @@ static void thermal_zone_device_set_polling(struct thermal_zone_device *tz,
return;
if (delay > 1000)
schedule_delayed_work(&(tz->poll_queue),
queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
round_jiffies(msecs_to_jiffies(delay)));
else
schedule_delayed_work(&(tz->poll_queue),
queue_delayed_work(system_freezable_wq, &(tz->poll_queue),
msecs_to_jiffies(delay));
}