Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 323133
b: refs/heads/master
c: 641f145
h: refs/heads/master
i:
  323131: 1bf5c5f
v: v3
  • Loading branch information
Silas Boyd-Wickizer authored and Jean Delvare committed Sep 23, 2012
1 parent 274c693 commit bb001c6
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1ec3ddfd27a77db55b8c0e80bcd27c656473fb96
refs/heads/master: 641f14560035bbb86500ea4b3a27ad27f034725b
5 changes: 5 additions & 0 deletions trunk/drivers/hwmon/coretemp.c
Original file line number Diff line number Diff line change
Expand Up @@ -815,17 +815,20 @@ static int __init coretemp_init(void)
if (err)
goto exit;

get_online_cpus();
for_each_online_cpu(i)
get_core_online(i);

#ifndef CONFIG_HOTPLUG_CPU
if (list_empty(&pdev_list)) {
put_online_cpus();
err = -ENODEV;
goto exit_driver_unreg;
}
#endif

register_hotcpu_notifier(&coretemp_cpu_notifier);
put_online_cpus();
return 0;

#ifndef CONFIG_HOTPLUG_CPU
Expand All @@ -840,6 +843,7 @@ static void __exit coretemp_exit(void)
{
struct pdev_entry *p, *n;

get_online_cpus();
unregister_hotcpu_notifier(&coretemp_cpu_notifier);
mutex_lock(&pdev_list_mutex);
list_for_each_entry_safe(p, n, &pdev_list, list) {
Expand All @@ -848,6 +852,7 @@ static void __exit coretemp_exit(void)
kfree(p);
}
mutex_unlock(&pdev_list_mutex);
put_online_cpus();
platform_driver_unregister(&coretemp_driver);
}

Expand Down

0 comments on commit bb001c6

Please sign in to comment.