===================================================================
@@ -1613,7 +1613,10 @@ void thermal_zone_device_unregister(stru
}
mutex_lock(&tz->lock);
+
+ tz->state |= TZ_STATE_FLAG_EXIT;
list_del(&tz->node);
+
mutex_unlock(&tz->lock);
/* Unbind all cdevs associated with 'this' thermal zone */
===================================================================
@@ -64,6 +64,7 @@ struct thermal_governor {
#define TZ_STATE_FLAG_SUSPENDED BIT(0)
#define TZ_STATE_FLAG_RESUMING BIT(1)
#define TZ_STATE_FLAG_INIT BIT(2)
+#define TZ_STATE_FLAG_EXIT BIT(3)
#define TZ_STATE_READY 0