aboutsummaryrefslogtreecommitdiff
path: root/sys/isa/atrtc.c
diff options
context:
space:
mode:
authorBruce Evans <bde@FreeBSD.org>1999-07-18 15:19:29 +0000
committerBruce Evans <bde@FreeBSD.org>1999-07-18 15:19:29 +0000
commitab64b6dc3c2469a484daf52899e3414582cae56b (patch)
tree7bdd76d3068a58337b6f97ae5ce185879f3fbc14 /sys/isa/atrtc.c
parent6b6ef746e5a944534bae0f218c810b05e127f9f7 (diff)
Notes
Diffstat (limited to 'sys/isa/atrtc.c')
-rw-r--r--sys/isa/atrtc.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sys/isa/atrtc.c b/sys/isa/atrtc.c
index 6f4ab12776bf..1b2bb63f55cd 100644
--- a/sys/isa/atrtc.c
+++ b/sys/isa/atrtc.c
@@ -34,7 +34,7 @@
* SUCH DAMAGE.
*
* from: @(#)clock.c 7.2 (Berkeley) 5/12/91
- * $Id: clock.c,v 1.137 1999/06/24 03:48:25 green Exp $
+ * $Id: clock.c,v 1.138 1999/06/27 09:08:48 peter Exp $
*/
/*
@@ -1107,7 +1107,7 @@ sysctl_machdep_i8254_freq SYSCTL_HANDLER_ARGS
* is is too generic. Should use it everywhere.
*/
freq = timer_freq;
- error = sysctl_handle_opaque(oidp, &freq, sizeof freq, req);
+ error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
if (error == 0 && req->newptr != NULL) {
if (timer0_state != RELEASED)
return (EBUSY); /* too much trouble to handle */
@@ -1119,7 +1119,7 @@ sysctl_machdep_i8254_freq SYSCTL_HANDLER_ARGS
}
SYSCTL_PROC(_machdep, OID_AUTO, i8254_freq, CTLTYPE_INT | CTLFLAG_RW,
- 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", "");
+ 0, sizeof(u_int), sysctl_machdep_i8254_freq, "I", "");
static int
sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
@@ -1127,10 +1127,10 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
int error;
u_int freq;
- if (!tsc_present)
+ if (tsc_timecounter.tc_frequency == 0)
return (EOPNOTSUPP);
freq = tsc_freq;
- error = sysctl_handle_opaque(oidp, &freq, sizeof freq, req);
+ error = sysctl_handle_int(oidp, &freq, sizeof(freq), req);
if (error == 0 && req->newptr != NULL) {
tsc_freq = freq;
tsc_timecounter.tc_frequency = tsc_freq;
@@ -1140,7 +1140,7 @@ sysctl_machdep_tsc_freq SYSCTL_HANDLER_ARGS
}
SYSCTL_PROC(_machdep, OID_AUTO, tsc_freq, CTLTYPE_INT | CTLFLAG_RW,
- 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", "");
+ 0, sizeof(u_int), sysctl_machdep_tsc_freq, "I", "");
static unsigned
i8254_get_timecount(struct timecounter *tc)