feat: fstat now handle symbolic link
[lunaix-os.git] / lunaix-os / hal / timer / hwtimer.c
index 1a994f7d3d163dcce4abaec3c9d5d530f3875bf1..4da156895fb3de77384edb9e0ac5dc5a75f058e5 100644 (file)
@@ -58,7 +58,8 @@ hwtimer_init(u32_t hertz, void* tick_callback)
 
     current_timer = hwt_ctx;
 
-    struct device* timerdev = device_addsys(NULL, hwt_ctx, hwt_ctx->name);
+    struct device* timerdev =
+      device_addsys(NULL, &hwt_ctx->class, hwt_ctx, hwt_ctx->name);
 
     timerdev->ops.exec_cmd = __hwtimer_ioctl;
 }
\ No newline at end of file