summaryrefslogtreecommitdiff
path: root/drivers/base/node.c
diff options
context:
space:
mode:
authorPatrick Mochel <mochel@osdl.org>2003-06-10 18:16:01 -0700
committerLinus Torvalds <torvalds@home.transmeta.com>2003-06-10 18:16:01 -0700
commitf5417dc2bb0e9900838c3b7779a77bef7ddba6c1 (patch)
tree16484c777022609404257d476f6de685bb8d76fd /drivers/base/node.c
parent1bca238aef3ab918efefa329aba3f4d1ed93b50a (diff)
[driver model] Compile fixes for NUMA
Diffstat (limited to 'drivers/base/node.c')
-rw-r--r--drivers/base/node.c15
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/base/node.c b/drivers/base/node.c
index 08e7c52c68e6..76a11b3288fa 100644
--- a/drivers/base/node.c
+++ b/drivers/base/node.c
@@ -2,7 +2,7 @@
* drivers/base/node.c - basic Node class support
*/
-#include <linux/device.h>
+#include <linux/sysdev.h>
#include <linux/module.h>
#include <linux/init.h>
#include <linux/mm.h>
@@ -14,18 +14,17 @@ static struct sysdev_class node_class = {
};
-static ssize_t node_read_cpumap(struct device * dev, char * buf)
+static ssize_t node_read_cpumap(struct sys_device * dev, char * buf)
{
- struct node *node_dev = to_node(to_root(dev));
+ struct node *node_dev = to_node(dev);
return sprintf(buf,"%lx\n",node_dev->cpumap);
}
static SYSDEV_ATTR(cpumap,S_IRUGO,node_read_cpumap,NULL);
#define K(x) ((x) << (PAGE_SHIFT - 10))
-static ssize_t node_read_meminfo(struct device * dev, char * buf)
+static ssize_t node_read_meminfo(struct sys_device * dev, char * buf)
{
- struct sys_root *node = to_root(dev);
- int nid = node->id;
+ int nid = dev->id;
struct sysinfo i;
si_meminfo_node(&i, nid);
return sprintf(buf, "\n"
@@ -64,8 +63,8 @@ int __init register_node(struct node *node, int num, struct node *parent)
error = sys_device_register(&node->sysdev);
if (!error){
- sys_device_create_file(&node->sysroot.dev, &attr_cpumap);
- sys_device_create_file(&node->sysroot.dev, &attr_meminfo);
+ sysdev_create_file(&node->sysdev, &attr_cpumap);
+ sysdev_create_file(&node->sysdev, &attr_meminfo);
}
return error;
}