Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 176277
b: refs/heads/master
c: f8246f3
h: refs/heads/master
i:
  176275: 5431284
v: v3
  • Loading branch information
Alex Chiang authored and Linus Torvalds committed Dec 15, 2009
1 parent bf73d51 commit 2963530
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 10 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: dee5d0d518defd0337a41f1a504428c9acc87be5
refs/heads/master: f8246f3159dfdf97b8b40f9e03e715bafedd22fc
20 changes: 11 additions & 9 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -271,16 +271,18 @@ struct node node_devices[MAX_NUMNODES];
*/
int register_cpu_under_node(unsigned int cpu, unsigned int nid)
{
if (node_online(nid)) {
struct sys_device *obj = get_cpu_sysdev(cpu);
if (!obj)
return 0;
return sysfs_create_link(&node_devices[nid].sysdev.kobj,
&obj->kobj,
kobject_name(&obj->kobj));
}
struct sys_device *obj;

return 0;
if (!node_online(nid))
return 0;

obj = get_cpu_sysdev(cpu);
if (!obj)
return 0;

return sysfs_create_link(&node_devices[nid].sysdev.kobj,
&obj->kobj,
kobject_name(&obj->kobj));
}

int unregister_cpu_under_node(unsigned int cpu, unsigned int nid)
Expand Down

0 comments on commit 2963530

Please sign in to comment.