feat: owloysius - dynamic init function invocator
[lunaix-os.git] / lunaix-os / hal / rtc / rtc_device.c
index cd94a97e7aeacc3db7cde9c53a1cfa46e7f2ee7f..ad063437c842de98fc7e1d8f75a695c71dd5f3e2 100644 (file)
@@ -91,7 +91,7 @@ hwrtc_register(struct devclass* class, struct hwrtc* rtc)
     }
 
     class->variant = rtc->id;
-    device_register(rtc->rtc_dev, class, "rtc%d", rtc->id);
+    register_device(rtc->rtc_dev, class, "rtc%d", rtc->id);
 }
 
 static void
@@ -101,16 +101,17 @@ __hwrtc_readinfo(struct twimap* mapping)
     twimap_printf(mapping, "name: %s\n", rtc->name);
     twimap_printf(mapping, "frequency: %dHz\n", rtc->base_freq);
     twimap_printf(mapping, "ticks count: %d\n", rtc->get_counts(rtc));
-    twimap_printf(
-      mapping, "ticking: %s\n", (rtc->state & RTC_STATE_MASKED) ? "no" : "yes");
+    twimap_printf(mapping,
+                  "ticking: %s\n",
+                  (rtc->state & RTC_STATE_MASKED) ? "no" : "yes");
 
     datetime_t dt;
     rtc->get_walltime(rtc, &dt);
 
     twimap_printf(
-      mapping, "recorded date: %d/%d/%d\n", dt.year, dt.month, dt.day);
+        mapping, "recorded date: %d/%d/%d\n", dt.year, dt.month, dt.day);
     twimap_printf(
-      mapping, "recorded time: %d:%d:%d\n", dt.hour, dt.minute, dt.second);
+        mapping, "recorded time: %d:%d:%d\n", dt.hour, dt.minute, dt.second);
     twimap_printf(mapping, "recorded weekday: %d\n", dt.weekday);
 }