VisionFive2 Linux kernel

StarFive Tech Linux Kernel for VisionFive (JH7110) boards (mirror)

More than 9999 Commits   32 Branches   54 Tags
author: Dmitry Osipenko <digetx@gmail.com> 2021-06-16 22:04:13 +0300 committer: Greg Kroah-Hartman <gregkh@linuxfoundation.org> 2021-07-25 14:37:31 +0200 commit: 09f1a8d85ec1ea6d8a6040f619cb881220c5eea5 parent: 505c12a1bd71a262aedeaf91b10ecbdab3c48a6b
Commit Summary:
thermal/core/thermal_of: Stop zone device before unregistering it
Diffstat:
1 file changed, 3 insertions, 0 deletions
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c
index 5b76f9a1280d..6379f26a335f 100644
--- a/drivers/thermal/thermal_of.c
+++ b/drivers/thermal/thermal_of.c
@@ -559,6 +559,9 @@ void thermal_zone_of_sensor_unregister(struct device *dev,
 	if (!tz)
 		return;
 
+	/* stop temperature polling */
+	thermal_zone_device_disable(tzd);
+
 	mutex_lock(&tzd->lock);
 	tzd->ops->get_temp = NULL;
 	tzd->ops->get_trend = NULL;