diff options
author | Artur Grabowski <art@cvs.openbsd.org> | 2000-07-19 13:40:27 +0000 |
---|---|---|
committer | Artur Grabowski <art@cvs.openbsd.org> | 2000-07-19 13:40:27 +0000 |
commit | 3d2e4b22783d20745cb1f088f0e5312d2acf067f (patch) | |
tree | 229d9d7f3e03601f1c131e4274f74da0793094db /sys/arch/i386 | |
parent | ed8347afbffe05a602c48da25ece1bd6f90c966e (diff) |
Use new timeouts for the led intr timeout.
Diffstat (limited to 'sys/arch/i386')
-rw-r--r-- | sys/arch/i386/isa/pcvt/pcvt_kbd.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/sys/arch/i386/isa/pcvt/pcvt_kbd.c b/sys/arch/i386/isa/pcvt/pcvt_kbd.c index d5f71535824..00490e6c35b 100644 --- a/sys/arch/i386/isa/pcvt/pcvt_kbd.c +++ b/sys/arch/i386/isa/pcvt/pcvt_kbd.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pcvt_kbd.c,v 1.34 2000/02/28 02:39:15 aaron Exp $ */ +/* $OpenBSD: pcvt_kbd.c,v 1.35 2000/07/19 13:40:26 art Exp $ */ /* * Copyright (c) 1992, 1995 Hellmuth Michaelis and Joerg Wunsch. @@ -169,12 +169,11 @@ do_vgapage(int page) * get lost other times as well. */ -static int lost_intr_timeout_queued = 0; +struct timeout kbd_led_intr_to; static void check_for_lost_intr (void *arg) { - lost_intr_timeout_queued = 0; if (inb(CONTROLLER_CTRL) & STATUS_OUTPBF) { int opri = spltty(); (void)pcrint(); @@ -244,11 +243,7 @@ update_led(void) } #if PCVT_UPDLED_LOSES_INTR - if (lost_intr_timeout_queued) - untimeout(check_for_lost_intr, (void *)NULL); - - timeout(check_for_lost_intr, (void *)NULL, hz); - lost_intr_timeout_queued = 1; + timeout_add(&kbd_led_intr_to, hz); #endif /* PCVT_UPDLED_LOSES_INTR */ } bail: @@ -581,6 +576,9 @@ kbd_code_init(void) doreset(); ovlinit(0); keyboard_is_initialized = 1; +#if !PCVT_NO_LED_UPDATE && PCVT_UPDLED_LOSES_INTR + timeout_set(&kbd_led_intr_to, check_for_lost_intr, NULL); +#endif } /*---------------------------------------------------------------------------* |