diff options
author | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-11-01 13:59:01 +0000 |
---|---|---|
committer | Mark Kettenis <kettenis@cvs.openbsd.org> | 2022-11-01 13:59:01 +0000 |
commit | 1dd151623e4b3d5dfbe1f6f38a7ecf39fe9e002d (patch) | |
tree | fd766f3ed3d92e65c29fa5acd0933d741fe5d203 | |
parent | 0802f06cc59197611662bcec2ffaaa94d12465b9 (diff) |
Use todr_attach().
ok phessler@
-rw-r--r-- | sys/arch/amd64/isa/clock.c | 6 | ||||
-rw-r--r-- | sys/arch/i386/isa/clock.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/sys/arch/amd64/isa/clock.c b/sys/arch/amd64/isa/clock.c index bf543e21d3d..294fe7483f9 100644 --- a/sys/arch/amd64/isa/clock.c +++ b/sys/arch/amd64/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.36 2022/02/13 19:15:09 mlarkin Exp $ */ +/* $OpenBSD: clock.c,v 1.37 2022/11/01 13:59:00 kettenis Exp $ */ /* $NetBSD: clock.c,v 1.1 2003/04/26 18:39:50 fvdl Exp $ */ /*- @@ -496,7 +496,6 @@ rtcsettime(struct todr_chip_handle *handle, struct timeval *tv) return 0; } -extern todr_chip_handle_t todr_handle; struct todr_chip_handle rtc_todr; void @@ -504,7 +503,8 @@ rtcinit(void) { rtc_todr.todr_gettime = rtcgettime; rtc_todr.todr_settime = rtcsettime; - todr_handle = &rtc_todr; + rtc_todr.todr_quality = 0; + todr_attach(&rtc_todr); } void diff --git a/sys/arch/i386/isa/clock.c b/sys/arch/i386/isa/clock.c index 566d2fe1dd2..1fba249f6ea 100644 --- a/sys/arch/i386/isa/clock.c +++ b/sys/arch/i386/isa/clock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: clock.c,v 1.60 2021/02/23 04:44:30 cheloha Exp $ */ +/* $OpenBSD: clock.c,v 1.61 2022/11/01 13:59:00 kettenis Exp $ */ /* $NetBSD: clock.c,v 1.39 1996/05/12 23:11:54 mycroft Exp $ */ /*- @@ -646,7 +646,6 @@ rtcsettime(struct todr_chip_handle *handle, struct timeval *tv) return 0; } -extern todr_chip_handle_t todr_handle; struct todr_chip_handle rtc_todr; void @@ -654,7 +653,8 @@ rtcinit(void) { rtc_todr.todr_gettime = rtcgettime; rtc_todr.todr_settime = rtcsettime; - todr_handle = &rtc_todr; + rtc_todr.todr_quality = 0; + todr_attach(&rtc_todr); } void |