#include <lunaix/clock.h>
#include <lunaix/input.h>
-#include <lunaix/mm/page.h>
+#include <lunaix/mm/pagetable.h>
#include <lunaix/mm/valloc.h>
#include <lunaix/spike.h>
#include <lunaix/status.h>
static DEFINE_LLIST(listener_chain);
-static struct device* input_devcat = NULL;
+static struct device_cat* input_devcat = NULL;
void
input_init()
int
__input_dev_read_pg(struct device* dev, void* buf, size_t offset)
{
- return __input_dev_read(dev, buf, offset, PG_SIZE);
+ return __input_dev_read(dev, buf, offset, PAGE_SIZE);
}
struct input_device*
va_list args;
va_start(args, name_fmt);
- struct device* dev = device_allocseq(input_devcat, idev);
+ struct device* dev = device_allocseq(dev_meta(input_devcat), idev);
- device_setname_vargs(dev, name_fmt, args);
- device_register(dev, class, NULL);
+ device_setname_vargs(dev_meta(dev), name_fmt, args);
+ register_device(dev, class, NULL);
idev->dev_if = dev;
dev->ops.read = __input_dev_read;