Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 51e20d0e authored by Rafael J. Wysocki's avatar Rafael J. Wysocki Committed by Len Brown
Browse files

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: default avatarRafael J. Wysocki <rjw@sisk.pl>
Signed-off-by: default avatarLen Brown <len.brown@intel.com>
parent 4505a201
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -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));
}