aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChen Gong <gong.chen@linux.intel.com>2010-10-08 22:01:48 -0400
committerGuenter Roeck <guenter.roeck@ericsson.com>2010-10-25 17:11:21 -0400
commit17c10d61c750619324ee2a46c5a9e03a435fe212 (patch)
tree46bceacae951391c9d80e0b20734a88f273eb360
parentfd53d08465a79d742a297be1d7d173f8a13972a6 (diff)
hwmon: ({core, pkg, via-cpu}temp) remove unnecessary CONFIG_HOTPLUG_CPU ifdefs
CONFIG_HOTPLUG_CPU is used too much in some drivers. This patch clean them up. Signed-off-by: Chen Gong <gong.chen@linux.intel.com> Signed-off-by: Guenter Roeck <guenter.roeck@ericsson.com>
-rw-r--r--drivers/hwmon/coretemp.c3
-rw-r--r--drivers/hwmon/pkgtemp.c7
-rw-r--r--drivers/hwmon/via-cputemp.c7
3 files changed, 3 insertions, 14 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c
index b4aea20ea076..467488c278e9 100644
--- a/drivers/hwmon/coretemp.c
+++ b/drivers/hwmon/coretemp.c
@@ -566,9 +566,8 @@ exit:
566static void __exit coretemp_exit(void) 566static void __exit coretemp_exit(void)
567{ 567{
568 struct pdev_entry *p, *n; 568 struct pdev_entry *p, *n;
569#ifdef CONFIG_HOTPLUG_CPU 569
570 unregister_hotcpu_notifier(&coretemp_cpu_notifier); 570 unregister_hotcpu_notifier(&coretemp_cpu_notifier);
571#endif
572 mutex_lock(&pdev_list_mutex); 571 mutex_lock(&pdev_list_mutex);
573 list_for_each_entry_safe(p, n, &pdev_list, list) { 572 list_for_each_entry_safe(p, n, &pdev_list, list) {
574 platform_device_unregister(p->pdev); 573 platform_device_unregister(p->pdev);
diff --git a/drivers/hwmon/pkgtemp.c b/drivers/hwmon/pkgtemp.c
index a8fc35e854c7..0798210590bc 100644
--- a/drivers/hwmon/pkgtemp.c
+++ b/drivers/hwmon/pkgtemp.c
@@ -339,7 +339,6 @@ exit:
339 return err; 339 return err;
340} 340}
341 341
342#ifdef CONFIG_HOTPLUG_CPU
343static void __cpuinit pkgtemp_device_remove(unsigned int cpu) 342static void __cpuinit pkgtemp_device_remove(unsigned int cpu)
344{ 343{
345 struct pdev_entry *p; 344 struct pdev_entry *p;
@@ -387,7 +386,6 @@ static int __cpuinit pkgtemp_cpu_callback(struct notifier_block *nfb,
387static struct notifier_block pkgtemp_cpu_notifier __refdata = { 386static struct notifier_block pkgtemp_cpu_notifier __refdata = {
388 .notifier_call = pkgtemp_cpu_callback, 387 .notifier_call = pkgtemp_cpu_callback,
389}; 388};
390#endif /* !CONFIG_HOTPLUG_CPU */
391 389
392static int __init pkgtemp_init(void) 390static int __init pkgtemp_init(void)
393{ 391{
@@ -411,9 +409,7 @@ static int __init pkgtemp_init(void)
411 } 409 }
412#endif 410#endif
413 411
414#ifdef CONFIG_HOTPLUG_CPU
415 register_hotcpu_notifier(&pkgtemp_cpu_notifier); 412 register_hotcpu_notifier(&pkgtemp_cpu_notifier);
416#endif
417 return 0; 413 return 0;
418 414
419#ifndef CONFIG_HOTPLUG_CPU 415#ifndef CONFIG_HOTPLUG_CPU
@@ -427,9 +423,8 @@ exit:
427static void __exit pkgtemp_exit(void) 423static void __exit pkgtemp_exit(void)
428{ 424{
429 struct pdev_entry *p, *n; 425 struct pdev_entry *p, *n;
430#ifdef CONFIG_HOTPLUG_CPU 426
431 unregister_hotcpu_notifier(&pkgtemp_cpu_notifier); 427 unregister_hotcpu_notifier(&pkgtemp_cpu_notifier);
432#endif
433 mutex_lock(&pdev_list_mutex); 428 mutex_lock(&pdev_list_mutex);
434 list_for_each_entry_safe(p, n, &pdev_list, list) { 429 list_for_each_entry_safe(p, n, &pdev_list, list) {
435 platform_device_unregister(p->pdev); 430 platform_device_unregister(p->pdev);
diff --git a/drivers/hwmon/via-cputemp.c b/drivers/hwmon/via-cputemp.c
index ba7839b29684..ec7fad747adc 100644
--- a/drivers/hwmon/via-cputemp.c
+++ b/drivers/hwmon/via-cputemp.c
@@ -235,7 +235,6 @@ exit:
235 return err; 235 return err;
236} 236}
237 237
238#ifdef CONFIG_HOTPLUG_CPU
239static void __cpuinit via_cputemp_device_remove(unsigned int cpu) 238static void __cpuinit via_cputemp_device_remove(unsigned int cpu)
240{ 239{
241 struct pdev_entry *p, *n; 240 struct pdev_entry *p, *n;
@@ -270,7 +269,6 @@ static int __cpuinit via_cputemp_cpu_callback(struct notifier_block *nfb,
270static struct notifier_block via_cputemp_cpu_notifier __refdata = { 269static struct notifier_block via_cputemp_cpu_notifier __refdata = {
271 .notifier_call = via_cputemp_cpu_callback, 270 .notifier_call = via_cputemp_cpu_callback,
272}; 271};
273#endif /* !CONFIG_HOTPLUG_CPU */
274 272
275static int __init via_cputemp_init(void) 273static int __init via_cputemp_init(void)
276{ 274{
@@ -311,9 +309,7 @@ static int __init via_cputemp_init(void)
311 goto exit_driver_unreg; 309 goto exit_driver_unreg;
312 } 310 }
313 311
314#ifdef CONFIG_HOTPLUG_CPU
315 register_hotcpu_notifier(&via_cputemp_cpu_notifier); 312 register_hotcpu_notifier(&via_cputemp_cpu_notifier);
316#endif
317 return 0; 313 return 0;
318 314
319exit_devices_unreg: 315exit_devices_unreg:
@@ -333,9 +329,8 @@ exit:
333static void __exit via_cputemp_exit(void) 329static void __exit via_cputemp_exit(void)
334{ 330{
335 struct pdev_entry *p, *n; 331 struct pdev_entry *p, *n;
336#ifdef CONFIG_HOTPLUG_CPU 332
337 unregister_hotcpu_notifier(&via_cputemp_cpu_notifier); 333 unregister_hotcpu_notifier(&via_cputemp_cpu_notifier);
338#endif
339 mutex_lock(&pdev_list_mutex); 334 mutex_lock(&pdev_list_mutex);
340 list_for_each_entry_safe(p, n, &pdev_list, list) { 335 list_for_each_entry_safe(p, n, &pdev_list, list) {
341 platform_device_unregister(p->pdev); 336 platform_device_unregister(p->pdev);