Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1409852 > unrolled thread

[PATCHv4 15/48] thermal: core: remove unnecessary device_remove() calls

Started byEduardo Valentin <edubezval@gmail.com>
First post2016-05-31 08:30 +0200
Last post2016-05-31 08:30 +0200
Articles 1 — 1 participant

Back to article view | Back to linux.kernel

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  [PATCHv4 15/48] thermal: core: remove unnecessary device_remove() calls Eduardo Valentin <edubezval@gmail.com> - 2016-05-31 08:30 +0200

#1409852 — [PATCHv4 15/48] thermal: core: remove unnecessary device_remove() calls

FromEduardo Valentin <edubezval@gmail.com>
Date2016-05-31 08:30 +0200
Subject[PATCHv4 15/48] thermal: core: remove unnecessary device_remove() calls
Message-ID<rELlE-7d7-31@gated-at.bofh.it>
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>
---
 drivers/thermal/thermal_core.c | 5 -----
 1 file changed, 5 deletions(-)

diff --git a/drivers/thermal/thermal_core.c b/drivers/thermal/thermal_core.c
index 0b60b04..c8a05a5 100644
--- a/drivers/thermal/thermal_core.c
+++ b/drivers/thermal/thermal_core.c
@@ -1803,11 +1803,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;
-- 
2.1.4

[toc] | [standalone]


Back to top | Article view | linux.kernel


csiph-web