aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/kernel/sysfs.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/kernel/sysfs.c')
-rw-r--r--arch/powerpc/kernel/sysfs.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/arch/powerpc/kernel/sysfs.c b/arch/powerpc/kernel/sysfs.c
index ed737cacf92d..5bc2585c8036 100644
--- a/arch/powerpc/kernel/sysfs.c
+++ b/arch/powerpc/kernel/sysfs.c
@@ -322,13 +322,31 @@ static void register_nodes(void)
322 } 322 }
323 } 323 }
324} 324}
325
326int sysfs_add_device_to_node(struct sys_device *dev, int nid)
327{
328 struct node *node = &node_devices[nid];
329 return sysfs_create_link(&node->sysdev.kobj, &dev->kobj,
330 kobject_name(&dev->kobj));
331}
332
333void sysfs_remove_device_from_node(struct sys_device *dev, int nid)
334{
335 struct node *node = &node_devices[nid];
336 sysfs_remove_link(&node->sysdev.kobj, kobject_name(&dev->kobj));
337}
338
325#else 339#else
326static void register_nodes(void) 340static void register_nodes(void)
327{ 341{
328 return; 342 return;
329} 343}
344
330#endif 345#endif
331 346
347EXPORT_SYMBOL_GPL(sysfs_add_device_to_node);
348EXPORT_SYMBOL_GPL(sysfs_remove_device_from_node);
349
332/* Only valid if CPU is present. */ 350/* Only valid if CPU is present. */
333static ssize_t show_physical_id(struct sys_device *dev, char *buf) 351static ssize_t show_physical_id(struct sys_device *dev, char *buf)
334{ 352{