Skip to contentSkip to conversation

hwmon: (coretemp) enable coretemp

PATCH In review Chen Gong 1 participant 1 message Jul 23, 2010

Subsystems (2)
lore
Share & tools
lore

Chen Gong

author
#0 lore raw

PATCH v3 2/3 hwmon: (coretemp) enable coretemp

if one coretemp device can't be added, it should allow subsequent adding operation because every new-added device will create a new sysfs group, not an additional sensor sys entry.hwmon: (coretemp) enable coretemp device add operation failure

if one coretemp device can't be added, it should allow subsequent adding operation because every new-added device will create a new sysfs group, not an additional sensor sys entry.

---
 drivers/hwmon/coretemp.c |   17 +++--------------
 1 files changed, 3 insertions(+), 14 deletions(-)
drivers/hwmon/coretemp.c +3 -14
index a3bad59..bdb7448 100644
@@ -537,12 +537,9 @@ static int __init coretemp_init(void)
 		 * sensors. We check this bit only, all the early CPUs
 		 * without thermal sensors will be filtered out.
 		 */
-		if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01)) {
-			err = coretemp_device_add(i);
-			if (err)
-				goto exit_devices_unreg;
-
-		} else {
+		if (c->cpuid_level >= 6 && (cpuid_eax(0x06) & 0x01))
+			coretemp_device_add(i);
+		else {
 			printk(KERN_INFO DRVNAME ": CPU (model=0x%x)"
 				" has no thermal sensor.\n", c->x86_model);
 		}
@@ -557,14 +554,6 @@ static int __init coretemp_init(void)
 #endif
 	return 0;
 
-exit_devices_unreg:
-	mutex_lock(&pdev_list_mutex);
-	list_for_each_entry_safe(p, n, &pdev_list, list) {
-		platform_device_unregister(p->pdev);
-		list_del(&p->list);
-		kfree(p);
-	}
-	mutex_unlock(&pdev_list_mutex);
 exit_driver_unreg:
 #ifndef CONFIG_HOTPLUG_CPU
 	platform_driver_unregister(&coretemp_driver);
Signature · 7 lines
1.7.2.rc3


_______________________________________________
lm-sensors mailing list
[email protected]
http://lists.lm-sensors.org/mailman/listinfo/lm-sensors