Commit f5417dc2 authored by Patrick Mochel's avatar Patrick Mochel Committed by Linus Torvalds

[driver model] Compile fixes for NUMA

parent 1bca238a
......@@ -13,13 +13,6 @@ static struct sysdev_class memblk_class = {
set_kset_name("memblk"),
};
static struct device_driver memblk_driver = {
.name = "memblk",
.bus = &system_bus_type,
};
/*
* register_memblk - Setup a driverfs device for a MemBlk
* @num - MemBlk number to use when creating the device.
......@@ -37,7 +30,7 @@ int __init register_memblk(struct memblk *memblk, int num, struct node *root)
error = sys_device_register(&memblk->sysdev);
if (!error)
error = sysfs_create_link(&root->sysdev.kobj,
&memblk->sysdev,kobj,
&memblk->sysdev.kobj,
memblk->sysdev.kobj.name);
return error;
}
......
......@@ -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;
}
......
......@@ -28,7 +28,6 @@ struct node {
extern int register_node(struct node *, int, struct node *);
#define to_node(_root) container_of(_root, struct node, sysroot)
#define to_root(_dev) container_of(_dev, struct sys_root, dev)
#define to_node(sys_device) container_of(sys_device, struct node, sysdev)
#endif /* _LINUX_NODE_H_ */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment