From: jbarnes@sgi.com (Jesse Barnes)
To: akpm@osdl.org, linux-kernel@vger.kernel.org
Subject: [PATCH] fix for register_cpu()
Date: Fri, 17 Oct 2003 10:44:30 -0700 [thread overview]
Message-ID: <20031017174430.GA6699@sgi.com> (raw)
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;
}
reply other threads:[~2003-10-17 17:46 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20031017174430.GA6699@sgi.com \
--to=jbarnes@sgi.com \
--cc=akpm@osdl.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.