From 1dd151623e4b3d5dfbe1f6f38a7ecf39fe9e002d Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Tue, 1 Nov 2022 13:59:01 +0000 Subject: Use todr_attach(). ok phessler@ --- sys/arch/amd64/isa/clock.c | 6 +++--- 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 -- cgit v1.2.3