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 <[email protected]> Reviewed-by: Yang Yingliang <[email protected]> Signed-off-by: Rafael J. Wysocki <[email protected]>
1 parent e398421 commit 47e3f00

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

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)