2007-07-05 16:01:25 +00:00
|
|
|
#include <common.h>
|
|
|
|
#include <command.h>
|
|
|
|
#include <init.h>
|
|
|
|
#include <driver.h>
|
|
|
|
#include <malloc.h>
|
2007-07-05 16:01:34 +00:00
|
|
|
#include <errno.h>
|
2007-07-05 16:01:25 +00:00
|
|
|
|
2007-07-05 16:01:29 +00:00
|
|
|
static struct device_d global_dev;
|
2007-07-05 16:01:25 +00:00
|
|
|
|
2007-07-05 16:01:57 +00:00
|
|
|
int global_add_param(struct param_d *param)
|
2007-07-05 16:01:25 +00:00
|
|
|
{
|
2007-07-05 16:01:57 +00:00
|
|
|
return dev_add_param(&global_dev, param);
|
2007-07-05 16:01:25 +00:00
|
|
|
}
|
|
|
|
|
2007-07-05 16:01:29 +00:00
|
|
|
static struct device_d global_dev = {
|
2007-07-05 16:01:25 +00:00
|
|
|
.name = "global",
|
|
|
|
.id = "env",
|
|
|
|
.map_base = 0,
|
|
|
|
.size = 0,
|
|
|
|
};
|
|
|
|
|
2007-07-05 16:01:29 +00:00
|
|
|
static struct driver_d global_driver = {
|
2007-07-05 16:01:25 +00:00
|
|
|
.name = "global",
|
2007-07-05 16:01:32 +00:00
|
|
|
.probe = dummy_probe,
|
2007-07-05 16:01:25 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
static int global_init(void)
|
|
|
|
{
|
2007-07-05 16:01:29 +00:00
|
|
|
register_device(&global_dev);
|
2007-07-05 16:01:25 +00:00
|
|
|
register_driver(&global_driver);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
coredevice_initcall(global_init);
|
|
|
|
|