Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 2375
b: refs/heads/master
c: 4b45099
h: refs/heads/master
i:
  2373: fc25cfe
  2371: aa46445
  2367: a37675d
v: v3
  • Loading branch information
Keiichiro Tokunaga authored and Greg Kroah-Hartman committed Jun 20, 2005
1 parent 5e358c4 commit f41ed7b
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 3 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: f409661877a25d11c2495bcd879807f17c286684
refs/heads/master: 4b45099b75832434c5113b9aed1499f8a69d13d5
20 changes: 18 additions & 2 deletions trunk/drivers/base/node.c
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ static SYSDEV_ATTR(distance, S_IRUGO, node_read_distance, NULL);
*
* Initialize and register the node device.
*/
int __init register_node(struct node *node, int num, struct node *parent)
int register_node(struct node *node, int num, struct node *parent)
{
int error;

Expand All @@ -153,8 +153,24 @@ int __init register_node(struct node *node, int num, struct node *parent)
return error;
}

/**
* unregister_node - unregister a node device
* @node: node going away
*
* Unregisters a node device @node. All the devices on the node must be
* unregistered before calling this function.
*/
void unregister_node(struct node *node)
{
sysdev_remove_file(&node->sysdev, &attr_cpumap);
sysdev_remove_file(&node->sysdev, &attr_meminfo);
sysdev_remove_file(&node->sysdev, &attr_numastat);
sysdev_remove_file(&node->sysdev, &attr_distance);

sysdev_unregister(&node->sysdev);
}

int __init register_node_type(void)
static int __init register_node_type(void)
{
return sysdev_class_register(&node_class);
}
Expand Down
1 change: 1 addition & 0 deletions trunk/include/linux/node.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ struct node {
};

extern int register_node(struct node *, int, struct node *);
extern void unregister_node(struct node *node);

#define to_node(sys_device) container_of(sys_device, struct node, sysdev)

Expand Down

0 comments on commit f41ed7b

Please sign in to comment.