Messages in this thread Patch in this message | | | Date | Fri, 17 Oct 2003 10:44:30 -0700 | Subject | [PATCH] fix for register_cpu() | From | (Jesse Barnes) |
| |
register_cpu() needs to honor the root argument that gets passed in if it's valid.
Jesse
diff -Nru a/drivers/base/cpu.c b/drivers/base/cpu.c --- a/drivers/base/cpu.c Fri Oct 17 10:41:16 2003 +++ b/drivers/base/cpu.c Fri Oct 17 10:41:16 2003 @@ -23,10 +23,18 @@ */ int __init register_cpu(struct cpu *cpu, int num, struct node *root) { + int error; + cpu->node_id = cpu_to_node(num); cpu->sysdev.id = num; cpu->sysdev.cls = &cpu_sysdev_class; - return sys_device_register(&cpu->sysdev); + + error = sys_device_register(&cpu->sysdev); + if (!error && root) + error = sysfs_create_link(&root->sysdev.kobj, + &cpu->sysdev.kobj, + kobject_name(&cpu->sysdev.kobj)); + return error; } - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |