]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
x86: topology.c cleanup
authorJaswinder Singh Rajput <jaswinderrajput@gmail.com>
Sat, 21 Mar 2009 11:25:24 +0000 (16:55 +0530)
committerJaswinder Singh Rajput <jaswinderrajput@gmail.com>
Sat, 21 Mar 2009 11:25:24 +0000 (16:55 +0530)
Impact: cleanup

Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
arch/x86/kernel/topology.c

index 0fcc95a354f7c28d980bf45fffd777c01a3ace25..7e4515957a1c89ad4980f7aa119120ee4d7cfa2a 100644 (file)
  *
  * Send feedback to <colpatch@us.ibm.com>
  */
-#include <linux/init.h>
-#include <linux/smp.h>
 #include <linux/nodemask.h>
 #include <linux/mmzone.h>
+#include <linux/init.h>
+#include <linux/smp.h>
 #include <asm/cpu.h>
 
 static DEFINE_PER_CPU(struct x86_cpu, cpu_devices);
@@ -47,6 +47,7 @@ int __ref arch_register_cpu(int num)
         */
        if (num)
                per_cpu(cpu_devices, num).cpu.hotpluggable = 1;
+
        return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
 }
 EXPORT_SYMBOL(arch_register_cpu);
@@ -56,12 +57,13 @@ void arch_unregister_cpu(int num)
        unregister_cpu(&per_cpu(cpu_devices, num).cpu);
 }
 EXPORT_SYMBOL(arch_unregister_cpu);
-#else
+#else /* CONFIG_HOTPLUG_CPU */
+
 static int __init arch_register_cpu(int num)
 {
        return register_cpu(&per_cpu(cpu_devices, num).cpu, num);
 }
-#endif /*CONFIG_HOTPLUG_CPU*/
+#endif /* CONFIG_HOTPLUG_CPU */
 
 static int __init topology_init(void)
 {
@@ -70,11 +72,11 @@ static int __init topology_init(void)
 #ifdef CONFIG_NUMA
        for_each_online_node(i)
                register_one_node(i);
-#endif /* CONFIG_NUMA */
+#endif
 
        for_each_present_cpu(i)
                arch_register_cpu(i);
+
        return 0;
 }
-
 subsys_initcall(topology_init);