diff options
Diffstat (limited to 'drivers/hwmon/coretemp.c')
-rw-r--r-- | drivers/hwmon/coretemp.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/drivers/hwmon/coretemp.c b/drivers/hwmon/coretemp.c index f31bc4c48644..6d02e3b06375 100644 --- a/drivers/hwmon/coretemp.c +++ b/drivers/hwmon/coretemp.c | |||
@@ -810,20 +810,20 @@ static int __init coretemp_init(void) | |||
810 | if (err) | 810 | if (err) |
811 | goto exit; | 811 | goto exit; |
812 | 812 | ||
813 | get_online_cpus(); | 813 | cpu_notifier_register_begin(); |
814 | for_each_online_cpu(i) | 814 | for_each_online_cpu(i) |
815 | get_core_online(i); | 815 | get_core_online(i); |
816 | 816 | ||
817 | #ifndef CONFIG_HOTPLUG_CPU | 817 | #ifndef CONFIG_HOTPLUG_CPU |
818 | if (list_empty(&pdev_list)) { | 818 | if (list_empty(&pdev_list)) { |
819 | put_online_cpus(); | 819 | cpu_notifier_register_done(); |
820 | err = -ENODEV; | 820 | err = -ENODEV; |
821 | goto exit_driver_unreg; | 821 | goto exit_driver_unreg; |
822 | } | 822 | } |
823 | #endif | 823 | #endif |
824 | 824 | ||
825 | register_hotcpu_notifier(&coretemp_cpu_notifier); | 825 | __register_hotcpu_notifier(&coretemp_cpu_notifier); |
826 | put_online_cpus(); | 826 | cpu_notifier_register_done(); |
827 | return 0; | 827 | return 0; |
828 | 828 | ||
829 | #ifndef CONFIG_HOTPLUG_CPU | 829 | #ifndef CONFIG_HOTPLUG_CPU |
@@ -838,8 +838,8 @@ static void __exit coretemp_exit(void) | |||
838 | { | 838 | { |
839 | struct pdev_entry *p, *n; | 839 | struct pdev_entry *p, *n; |
840 | 840 | ||
841 | get_online_cpus(); | 841 | cpu_notifier_register_begin(); |
842 | unregister_hotcpu_notifier(&coretemp_cpu_notifier); | 842 | __unregister_hotcpu_notifier(&coretemp_cpu_notifier); |
843 | mutex_lock(&pdev_list_mutex); | 843 | mutex_lock(&pdev_list_mutex); |
844 | list_for_each_entry_safe(p, n, &pdev_list, list) { | 844 | list_for_each_entry_safe(p, n, &pdev_list, list) { |
845 | platform_device_unregister(p->pdev); | 845 | platform_device_unregister(p->pdev); |
@@ -847,7 +847,7 @@ static void __exit coretemp_exit(void) | |||
847 | kfree(p); | 847 | kfree(p); |
848 | } | 848 | } |
849 | mutex_unlock(&pdev_list_mutex); | 849 | mutex_unlock(&pdev_list_mutex); |
850 | put_online_cpus(); | 850 | cpu_notifier_register_done(); |
851 | platform_driver_unregister(&coretemp_driver); | 851 | platform_driver_unregister(&coretemp_driver); |
852 | } | 852 | } |
853 | 853 | ||