diff options
Diffstat (limited to 'drivers/base')
-rw-r--r-- | drivers/base/bus.c | 2 | ||||
-rw-r--r-- | drivers/base/topology.c | 12 |
2 files changed, 9 insertions, 5 deletions
diff --git a/drivers/base/bus.c b/drivers/base/bus.c index 59dc8086e4fa..83e910a57563 100644 --- a/drivers/base/bus.c +++ b/drivers/base/bus.c @@ -1218,7 +1218,7 @@ err_dev: * with the name of the subsystem. The root device can carry subsystem- * wide attributes. All registered devices are below this single root * device and are named after the subsystem with a simple enumeration - * number appended. The registered devices are not explicitely named; + * number appended. The registered devices are not explicitly named; * only 'id' in the device needs to be set. * * Do not use this interface for anything new, it exists for compatibility diff --git a/drivers/base/topology.c b/drivers/base/topology.c index ad9d17762664..bbcbd3c43926 100644 --- a/drivers/base/topology.c +++ b/drivers/base/topology.c @@ -160,16 +160,20 @@ static int topology_cpu_callback(struct notifier_block *nfb, static int topology_sysfs_init(void) { int cpu; - int rc; + int rc = 0; + + cpu_notifier_register_begin(); for_each_online_cpu(cpu) { rc = topology_add_dev(cpu); 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); |