Message ID | 162426880307.395.3890058875463840927.tip-bot2@tip-bot2 |
---|---|
State | Superseded |
Headers | show |
Series | [thermal:,thermal/next] thermal/core/thermal_of: Stop zone device before unregistering it | expand |
diff --git a/drivers/thermal/thermal_of.c b/drivers/thermal/thermal_of.c index 5b76f9a..6379f26 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;