===================================================================
@@ -1469,6 +1469,7 @@ thermal_zone_device_register_with_trips(
thermal_zone_destroy_device_groups(tz);
goto remove_id;
}
+ thermal_zone_device_init(tz);
result = device_register(&tz->device);
if (result)
goto release_device;
@@ -1507,7 +1508,6 @@ thermal_zone_device_register_with_trips(
mutex_unlock(&thermal_list_lock);
- thermal_zone_device_init(tz);
/* Update the new thermal zone and mark it as already updated. */
if (atomic_cmpxchg(&tz->need_update, 1, 0))
thermal_zone_device_update(tz, THERMAL_EVENT_UNSPECIFIED);