git://scm.lunaixsky.com
/
lunaix-os.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Decoupling Architectural-specific Code (#35)
[lunaix-os.git]
/
lunaix-os
/
hal
/
char
/
devzero.c
diff --git
a/lunaix-os/hal/char/devzero.c
b/lunaix-os/hal/char/devzero.c
index 9c0b6c75518dd24dccc4043fd8fb35263f635786..9013a471f09c22234ff6984e105e700980f04eb1 100644
(file)
--- a/
lunaix-os/hal/char/devzero.c
+++ b/
lunaix-os/hal/char/devzero.c
@@
-1,13
+1,13
@@
#include <lunaix/device.h>
#include <lunaix/device.h>
-#include <lunaix/mm/page.h>
+#include <lunaix/mm/page
table
.h>
#include <klibc/string.h>
static int
__zero_rd_pg(struct device* dev, void* buf, size_t offset)
{
#include <klibc/string.h>
static int
__zero_rd_pg(struct device* dev, void* buf, size_t offset)
{
- memset(&((u8_t*)buf)[offset], 0, P
G
_SIZE);
- return P
G
_SIZE;
+ memset(&((u8_t*)buf)[offset], 0, P
AGE
_SIZE);
+ return P
AGE
_SIZE;
}
static int
}
static int
@@
-24,7
+24,7
@@
pdev_zerodev_init(struct device_def* def)
devzero->ops.read_page = __zero_rd_pg;
devzero->ops.read = __zero_rd;
devzero->ops.read_page = __zero_rd_pg;
devzero->ops.read = __zero_rd;
-
device_register
(devzero, &def->class, "zero");
+
register_device
(devzero, &def->class, "zero");
return 0;
}
return 0;
}