Commit 17c10d61 authored by Chen Gong's avatar Chen Gong Committed by Guenter Roeck

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: default avatarChen Gong <gong.chen@linux.intel.com>
Signed-off-by: default avatarGuenter Roeck <guenter.roeck@ericsson.com>
parent fd53d084
...@@ -566,9 +566,8 @@ static int __init coretemp_init(void) ...@@ -566,9 +566,8 @@ static int __init coretemp_init(void)
static void __exit coretemp_exit(void) static void __exit coretemp_exit(void)
{ {
struct pdev_entry *p, *n; struct pdev_entry *p, *n;
#ifdef CONFIG_HOTPLUG_CPU
unregister_hotcpu_notifier(&coretemp_cpu_notifier); unregister_hotcpu_notifier(&coretemp_cpu_notifier);
#endif
mutex_lock(&pdev_list_mutex); mutex_lock(&pdev_list_mutex);
list_for_each_entry_safe(p, n, &pdev_list, list) { list_for_each_entry_safe(p, n, &pdev_list, list) {
platform_device_unregister(p->pdev); platform_device_unregister(p->pdev);
......
...@@ -339,7 +339,6 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu) ...@@ -339,7 +339,6 @@ static int __cpuinit pkgtemp_device_add(unsigned int cpu)
return err; return err;
} }
#ifdef CONFIG_HOTPLUG_CPU
static void __cpuinit pkgtemp_device_remove(unsigned int cpu) static void __cpuinit pkgtemp_device_remove(unsigned int cpu)
{ {
struct pdev_entry *p; struct pdev_entry *p;
...@@ -387,7 +386,6 @@ static int __cpuinit pkgtemp_cpu_callback(struct notifier_block *nfb, ...@@ -387,7 +386,6 @@ static int __cpuinit pkgtemp_cpu_callback(struct notifier_block *nfb,
static struct notifier_block pkgtemp_cpu_notifier __refdata = { static struct notifier_block pkgtemp_cpu_notifier __refdata = {
.notifier_call = pkgtemp_cpu_callback, .notifier_call = pkgtemp_cpu_callback,
}; };
#endif /* !CONFIG_HOTPLUG_CPU */
static int __init pkgtemp_init(void) static int __init pkgtemp_init(void)
{ {
...@@ -411,9 +409,7 @@ static int __init pkgtemp_init(void) ...@@ -411,9 +409,7 @@ static int __init pkgtemp_init(void)
} }
#endif #endif
#ifdef CONFIG_HOTPLUG_CPU
register_hotcpu_notifier(&pkgtemp_cpu_notifier); register_hotcpu_notifier(&pkgtemp_cpu_notifier);
#endif
return 0; return 0;
#ifndef CONFIG_HOTPLUG_CPU #ifndef CONFIG_HOTPLUG_CPU
...@@ -427,9 +423,8 @@ static int __init pkgtemp_init(void) ...@@ -427,9 +423,8 @@ static int __init pkgtemp_init(void)
static void __exit pkgtemp_exit(void) static void __exit pkgtemp_exit(void)
{ {
struct pdev_entry *p, *n; struct pdev_entry *p, *n;
#ifdef CONFIG_HOTPLUG_CPU
unregister_hotcpu_notifier(&pkgtemp_cpu_notifier); unregister_hotcpu_notifier(&pkgtemp_cpu_notifier);
#endif
mutex_lock(&pdev_list_mutex); mutex_lock(&pdev_list_mutex);
list_for_each_entry_safe(p, n, &pdev_list, list) { list_for_each_entry_safe(p, n, &pdev_list, list) {
platform_device_unregister(p->pdev); platform_device_unregister(p->pdev);
......
...@@ -235,7 +235,6 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu) ...@@ -235,7 +235,6 @@ static int __cpuinit via_cputemp_device_add(unsigned int cpu)
return err; return err;
} }
#ifdef CONFIG_HOTPLUG_CPU
static void __cpuinit via_cputemp_device_remove(unsigned int cpu) static void __cpuinit via_cputemp_device_remove(unsigned int cpu)
{ {
struct pdev_entry *p, *n; struct pdev_entry *p, *n;
...@@ -270,7 +269,6 @@ static int __cpuinit via_cputemp_cpu_callback(struct notifier_block *nfb, ...@@ -270,7 +269,6 @@ static int __cpuinit via_cputemp_cpu_callback(struct notifier_block *nfb,
static struct notifier_block via_cputemp_cpu_notifier __refdata = { static struct notifier_block via_cputemp_cpu_notifier __refdata = {
.notifier_call = via_cputemp_cpu_callback, .notifier_call = via_cputemp_cpu_callback,
}; };
#endif /* !CONFIG_HOTPLUG_CPU */
static int __init via_cputemp_init(void) static int __init via_cputemp_init(void)
{ {
...@@ -311,9 +309,7 @@ static int __init via_cputemp_init(void) ...@@ -311,9 +309,7 @@ static int __init via_cputemp_init(void)
goto exit_driver_unreg; goto exit_driver_unreg;
} }
#ifdef CONFIG_HOTPLUG_CPU
register_hotcpu_notifier(&via_cputemp_cpu_notifier); register_hotcpu_notifier(&via_cputemp_cpu_notifier);
#endif
return 0; return 0;
exit_devices_unreg: exit_devices_unreg:
...@@ -333,9 +329,8 @@ static int __init via_cputemp_init(void) ...@@ -333,9 +329,8 @@ static int __init via_cputemp_init(void)
static void __exit via_cputemp_exit(void) static void __exit via_cputemp_exit(void)
{ {
struct pdev_entry *p, *n; struct pdev_entry *p, *n;
#ifdef CONFIG_HOTPLUG_CPU
unregister_hotcpu_notifier(&via_cputemp_cpu_notifier); unregister_hotcpu_notifier(&via_cputemp_cpu_notifier);
#endif
mutex_lock(&pdev_list_mutex); mutex_lock(&pdev_list_mutex);
list_for_each_entry_safe(p, n, &pdev_list, list) { list_for_each_entry_safe(p, n, &pdev_list, list) {
platform_device_unregister(p->pdev); platform_device_unregister(p->pdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment