feat: kprintf now goes into dedicated pseudo-dev rather than flooding the framebuffer
[lunaix-os.git] / lunaix-os / hal / rtc / mc146818a.c
index e918ffdba83024aa0a578b608d62b3c0fea2b0fc..6b645279e9331def4ba43877f3318caeb83331ce 100644 (file)
@@ -195,7 +195,7 @@ rtc_init(struct device_def* devdef)
     // Make sure the rtc timer is disabled by default
     rtc_disable_timer();
 
-    struct hwrtc* rtc = hwrtc_alloc_new("mc146818");
+    struct hwrtc* rtc = hwrtc_alloc_new(devdef, "mc146818");
     struct mc146818* state = valloc(sizeof(struct mc146818));
 
     state->rtc_context = rtc;
@@ -216,8 +216,8 @@ rtc_init(struct device_def* devdef)
 }
 
 static struct device_def devrtc_mc146818 = {
-    .name = "rtc_mc146818",
-    .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC, 1),
+    .name = "MC146818 RTC",
+    .class = DEVCLASS(DEVIF_SOC, DEVFN_TIME, DEV_RTC),
     .init = rtc_init
 };
 EXPORT_DEVICE(mc146818, &devrtc_mc146818, load_earlystage);
\ No newline at end of file