Skip to content

Commit 47e3f00

Browse files
vireshkrafaeljw
authored andcommitted
thermal: core: Use device_unregister() instead of device_del/put()
Lets not open code device_unregister() unnecessarily. Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org> Reviewed-by: Yang Yingliang <yangyingliang@huawei.com> Signed-off-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
1 parent e398421 commit 47e3f00

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

drivers/thermal/thermal_core.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1105,8 +1105,7 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
11051105

11061106
mutex_unlock(&thermal_list_lock);
11071107

1108-
device_del(&cdev->device);
1109-
put_device(&cdev->device);
1108+
device_unregister(&cdev->device);
11101109
}
11111110
EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
11121111

0 commit comments

Comments
 (0)