diff options
-rw-r--r-- | drivers/base/topology.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/drivers/base/topology.c b/drivers/base/topology.c index 94ffee378f10..a738d1069d6b 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c | |||
@@ -161,16 +161,20 @@ static int topology_cpu_callback(struct notifier_block *nfb, | |||
161 | static int topology_sysfs_init(void) | 161 | static int topology_sysfs_init(void) |
162 | { | 162 | { |
163 | int cpu; | 163 | int cpu; |
164 | int rc; | 164 | int rc = 0; |
165 | |||
166 | cpu_notifier_register_begin(); | ||
165 | 167 | ||
166 | for_each_online_cpu(cpu) { | 168 | for_each_online_cpu(cpu) { |
167 | rc = topology_add_dev(cpu); | 169 | rc = topology_add_dev(cpu); |
168 | if (rc) | 170 | if (rc) |
169 | return rc; | 171 | goto out; |
170 | } | 172 | } |
171 | hotcpu_notifier(topology_cpu_callback, 0); | 173 | __hotcpu_notifier(topology_cpu_callback, 0); |
172 | 174 | ||
173 | return 0; | 175 | out: |
176 | cpu_notifier_register_done(); | ||
177 | return rc; | ||
174 | } | 178 | } |
175 | 179 | ||
176 | device_initcall(topology_sysfs_init); | 180 | device_initcall(topology_sysfs_init); |