|
@@ -1102,8 +1102,9 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
|
|
|
mutex_unlock(&thermal_list_lock);
|
|
|
|
|
|
ida_simple_remove(&thermal_cdev_ida, cdev->id);
|
|
|
- device_unregister(&cdev->device);
|
|
|
+ device_del(&cdev->device);
|
|
|
thermal_cooling_device_destroy_sysfs(cdev);
|
|
|
+ put_device(&cdev->device);
|
|
|
}
|
|
|
EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
|
|
|
|