]> git.kernelconcepts.de Git - karo-tx-linux.git/blobdiff - drivers/base/topology.c
driver core fixes: sysfs_create_group() retval in topology.c
[karo-tx-linux.git] / drivers / base / topology.c
index 8c52421cbc545b54a6ce1c84c0cf1bf3f734c751..28dccb730af99032a9bf653990b604df35ff29b9 100644 (file)
@@ -97,8 +97,7 @@ static struct attribute_group topology_attr_group = {
 /* Add/Remove cpu_topology interface for CPU device */
 static int __cpuinit topology_add_dev(struct sys_device * sys_dev)
 {
-       sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
-       return 0;
+       return sysfs_create_group(&sys_dev->kobj, &topology_attr_group);
 }
 
 static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
@@ -107,7 +106,7 @@ static int __cpuinit topology_remove_dev(struct sys_device * sys_dev)
        return 0;
 }
 
-static int topology_cpu_callback(struct notifier_block *nfb,
+static int __cpuinit topology_cpu_callback(struct notifier_block *nfb,
                unsigned long action, void *hcpu)
 {
        unsigned int cpu = (unsigned long)hcpu;
@@ -125,7 +124,7 @@ static int topology_cpu_callback(struct notifier_block *nfb,
        return NOTIFY_OK;
 }
 
-static struct notifier_block topology_cpu_notifier =
+static struct notifier_block __cpuinitdata topology_cpu_notifier =
 {
        .notifier_call = topology_cpu_callback,
 };
@@ -139,7 +138,7 @@ static int __cpuinit topology_sysfs_init(void)
                                (void *)(long)i);
        }
 
-       register_cpu_notifier(&topology_cpu_notifier);
+       register_hotcpu_notifier(&topology_cpu_notifier);
 
        return 0;
 }