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
feat: fstat now handle symbolic link
[lunaix-os.git]
/
lunaix-os
/
hal
/
rtc
/
hwrtc.c
diff --git
a/lunaix-os/hal/rtc/hwrtc.c
b/lunaix-os/hal/rtc/hwrtc.c
index 5a53664214da108e4435a917fa8598b3640a620b..82f98eb9fbf2f132abe443b2783fe5f4fe789c16 100644
(file)
--- a/
lunaix-os/hal/rtc/hwrtc.c
+++ b/
lunaix-os/hal/rtc/hwrtc.c
@@
-69,7
+69,7
@@
hwrtc_read(struct device* dev, void* buf, size_t offset, size_t len)
}
struct hwrtc*
}
struct hwrtc*
-hwrtc_alloc_new(char* name)
+hwrtc_alloc_new(
struct device_def* def,
char* name)
{
struct hwrtc* rtc_instance = valloc(sizeof(struct hwrtc));
{
struct hwrtc* rtc_instance = valloc(sizeof(struct hwrtc));
@@
-85,7
+85,7
@@
hwrtc_alloc_new(char* name)
rtc_instance->name = name;
struct device* rtcdev =
rtc_instance->name = name;
struct device* rtcdev =
- device_addsys(NULL, rtc_instance, "rtc%d", rtc_count);
+ device_addsys(NULL,
&def->class,
rtc_instance, "rtc%d", rtc_count);
rtcdev->ops.exec_cmd = hwrtc_ioctl;
rtcdev->ops.read = hwrtc_read;
rtcdev->ops.exec_cmd = hwrtc_ioctl;
rtcdev->ops.read = hwrtc_read;