* [PATCH] fix for register_cpu()
@ 2003-10-17 17:44 Jesse Barnes
0 siblings, 0 replies; only message in thread
From: Jesse Barnes @ 2003-10-17 17:44 UTC (permalink / raw)
To: akpm, linux-kernel
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;
}
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-10-17 17:46 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-10-17 17:44 [PATCH] fix for register_cpu() Jesse Barnes
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).