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

Commit 0dbb7f7a authored by Linux Build Service Account's avatar Linux Build Service Account Committed by Gerrit - the friendly Code Review server
Browse files

Merge "thermal: Fix deadlock in thermal thermal_zone_device_check"

parents 57ff96e4 1634c19e
Loading
Loading
Loading
Loading
+2 −2
Original line number Original line Diff line number Diff line
@@ -407,7 +407,7 @@ static void thermal_zone_device_set_polling(struct workqueue_struct *queue,
		mod_delayed_work(queue, &tz->poll_queue,
		mod_delayed_work(queue, &tz->poll_queue,
				 msecs_to_jiffies(delay));
				 msecs_to_jiffies(delay));
	else
	else
		cancel_delayed_work_sync(&tz->poll_queue);
		cancel_delayed_work(&tz->poll_queue);
}
}


static void monitor_thermal_zone(struct thermal_zone_device *tz)
static void monitor_thermal_zone(struct thermal_zone_device *tz)
@@ -2373,7 +2373,7 @@ void thermal_zone_device_unregister(struct thermal_zone_device *tz)


	mutex_unlock(&thermal_list_lock);
	mutex_unlock(&thermal_list_lock);


	thermal_zone_device_set_polling(NULL, tz, 0);
	cancel_delayed_work_sync(&tz->poll_queue);


	if (tz->type[0])
	if (tz->type[0])
		device_remove_file(&tz->device, &dev_attr_type);
		device_remove_file(&tz->device, &dev_attr_type);