diff options
author | Eduardo Valentin <edubezval@gmail.com> | 2016-11-07 21:08:53 -0800 |
---|---|---|
committer | Zhang Rui <rui.zhang@intel.com> | 2016-11-23 10:06:12 +0800 |
commit | 2a4806bf7afd37c719b10099415318a9936a3293 (patch) | |
tree | 8e390c5bf314e82e5a6ad867109accf43dbc3d11 /drivers/thermal | |
parent | 4d0fe7490d7f4d61b582acbae718328284f151b9 (diff) | |
download | op-kernel-dev-2a4806bf7afd37c719b10099415318a9936a3293.zip op-kernel-dev-2a4806bf7afd37c719b10099415318a9936a3293.tar.gz |
thermal: core: remove unnecessary device_remove() calls
Given that cdevs sysfs properties are already registered using
the dev.groups, there is no need to explicitly call device_remove()
for each property.
Cc: Zhang Rui <rui.zhang@intel.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
Signed-off-by: Eduardo Valentin <edubezval@gmail.com>
Signed-off-by: Zhang Rui <rui.zhang@intel.com>
Diffstat (limited to 'drivers/thermal')
-rw-r--r-- | drivers/thermal/thermal_core.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c index b1d6de9..6100ae7 100644 --- a/drivers/thermal/thermal_core.c +++ b/drivers/thermal/thermal_core.c @@ -1876,11 +1876,6 @@ void thermal_cooling_device_unregister(struct thermal_cooling_device *cdev) mutex_unlock(&thermal_list_lock); - if (cdev->type[0]) - device_remove_file(&cdev->device, &dev_attr_cdev_type); - device_remove_file(&cdev->device, &dev_attr_max_state); - device_remove_file(&cdev->device, &dev_attr_cur_state); - release_idr(&thermal_cdev_idr, &thermal_idr_lock, cdev->id); device_unregister(&cdev->device); return; |