[lm-sensors] [PATCH V3 1/3] hwmon: (coretemp) update hotplug condition check

Chen Gong gong.chen at linux.intel.com
Fri Jul 23 04:09:26 CEST 2010


this patch fixes an unnecessary driver unregister.
Because even none of online cpus supports coretemp, we can't
assume new onlined cpu doesn't support it either. If related
driver is unregistered there we have no chance to use coretemp
from then on.

Signed-off-by: Chen Gong <gong.chen at linux.intel.com>
---
 drivers/hwmon/coretemp.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index 05344af..a3bad59 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -566,7 +566,9 @@ exit_devices_unreg:
 	}
 	mutex_unlock(&pdev_list_mutex);
 exit_driver_unreg:
+#ifndef CONFIG_HOTPLUG_CPU
 	platform_driver_unregister(&coretemp_driver);
+#endif
 exit:
 	return err;
 }
-- 
1.7.2.rc3





More information about the lm-sensors mailing list