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:
Viresh Kumar 2023-01-18 14:08:26 +05:30 committed by Rafael J. Wysocki
parent e398421fd0
commit 47e3f00074

View File

@ -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);