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>
This commit is contained in:
parent
e398421fd0
commit
47e3f00074
@ -1105,8 +1105,7 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev)
|
||||
|
||||
mutex_unlock(&thermal_list_lock);
|
||||
|
||||
device_del(&cdev->device);
|
||||
put_device(&cdev->device);
|
||||
device_unregister(&cdev->device);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(thermal_cooling_device_unregister);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user