Lines 275-286
Link Here
|
275 |
int register_cpu_under_node(unsigned int cpu, unsigned int nid) |
275 |
int register_cpu_under_node(unsigned int cpu, unsigned int nid) |
276 |
{ |
276 |
{ |
277 |
if (node_online(nid)) { |
277 |
if (node_online(nid)) { |
|
|
278 |
int ret; |
278 |
struct sys_device *obj = get_cpu_sysdev(cpu); |
279 |
struct sys_device *obj = get_cpu_sysdev(cpu); |
|
|
280 |
|
279 |
if (!obj) |
281 |
if (!obj) |
280 |
return 0; |
282 |
return 0; |
281 |
return sysfs_create_link(&node_devices[nid].sysdev.kobj, |
283 |
ret = sysfs_create_link(&node_devices[nid].sysdev.kobj, |
282 |
&obj->kobj, |
284 |
&obj->kobj, |
283 |
kobject_name(&obj->kobj)); |
285 |
kobject_name(&obj->kobj)); |
|
|
286 |
if (ret) |
287 |
return ret; |
288 |
|
289 |
return sysfs_create_link(&obj->kobj, |
290 |
&node_devices[nid].sysdev.kobj, |
291 |
kobject_name(&node_devices[nid].sysdev.kobj)); |
284 |
} |
292 |
} |
285 |
|
293 |
|
286 |
return 0; |
294 |
return 0; |
Lines 293-298
Link Here
|
293 |
if (obj) |
301 |
if (obj) |
294 |
sysfs_remove_link(&node_devices[nid].sysdev.kobj, |
302 |
sysfs_remove_link(&node_devices[nid].sysdev.kobj, |
295 |
kobject_name(&obj->kobj)); |
303 |
kobject_name(&obj->kobj)); |
|
|
304 |
sysfs_remove_link(&obj->kobj, |
305 |
kobject_name(&node_devices[nid].sysdev.kobj)); |
296 |
} |
306 |
} |
297 |
return 0; |
307 |
return 0; |
298 |
} |
308 |
} |