X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/f044ca812256b421e793c4335ce1ffed74710a70..8b8f49b713d64065775fe538232f8639083601bd:/lunaix-os/hal/timer/hwtimer.c?ds=sidebyside diff --git a/lunaix-os/hal/timer/hwtimer.c b/lunaix-os/hal/timer/hwtimer.c index 1a994f7..91dca07 100644 --- a/lunaix-os/hal/timer/hwtimer.c +++ b/lunaix-os/hal/timer/hwtimer.c @@ -58,7 +58,9 @@ 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_allocsys(NULL, hwt_ctx); timerdev->ops.exec_cmd = __hwtimer_ioctl; + + device_register(timerdev, &hwt_ctx->class, hwt_ctx->name); } \ No newline at end of file