|
@@ -161,16 +161,20 @@ static int topology_cpu_callback(struct notifier_block *nfb,
|
|
static int topology_sysfs_init(void)
|
|
static int topology_sysfs_init(void)
|
|
{
|
|
{
|
|
int cpu;
|
|
int cpu;
|
|
- int rc;
|
|
|
|
|
|
+ int rc = 0;
|
|
|
|
+
|
|
|
|
+ cpu_notifier_register_begin();
|
|
|
|
|
|
for_each_online_cpu(cpu) {
|
|
for_each_online_cpu(cpu) {
|
|
rc = topology_add_dev(cpu);
|
|
rc = topology_add_dev(cpu);
|
|
if (rc)
|
|
if (rc)
|
|
- return rc;
|
|
|
|
|
|
+ goto out;
|
|
}
|
|
}
|
|
- hotcpu_notifier(topology_cpu_callback, 0);
|
|
|
|
|
|
+ __hotcpu_notifier(topology_cpu_callback, 0);
|
|
|
|
|
|
- return 0;
|
|
|
|
|
|
+out:
|
|
|
|
+ cpu_notifier_register_done();
|
|
|
|
+ return rc;
|
|
}
|
|
}
|
|
|
|
|
|
device_initcall(topology_sysfs_init);
|
|
device_initcall(topology_sysfs_init);
|