summaryrefslogtreecommitdiff
path: root/sys/arch/sparc/dev
diff options
context:
space:
mode:
authorJason Wright <jason@cvs.openbsd.org>2001-01-30 03:55:11 +0000
committerJason Wright <jason@cvs.openbsd.org>2001-01-30 03:55:11 +0000
commit83b5eb7d2f91ad4c187a5a6965aa73bea7abd976 (patch)
tree2e5712762d099ff2c4064a037fdec20cb7a59c0b /sys/arch/sparc/dev
parent304e05671f7fe2525641445404928bfe715f208d (diff)
new timeouts
Diffstat (limited to 'sys/arch/sparc/dev')
-rw-r--r--sys/arch/sparc/dev/led.c7
-rw-r--r--sys/arch/sparc/dev/led.h3
2 files changed, 7 insertions, 3 deletions
diff --git a/sys/arch/sparc/dev/led.c b/sys/arch/sparc/dev/led.c
index 39f13ebe86d..e7f535b2042 100644
--- a/sys/arch/sparc/dev/led.c
+++ b/sys/arch/sparc/dev/led.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: led.c,v 1.5 1999/03/01 04:56:05 jason Exp $ */
+/* $OpenBSD: led.c,v 1.6 2001/01/30 03:55:10 jason Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright (jason@thought.net)
@@ -43,6 +43,7 @@
#include <sys/syslog.h>
#include <sys/device.h>
#include <sys/malloc.h>
+#include <sys/timeout.h>
#include <machine/autoconf.h>
#include <machine/ctlreg.h>
@@ -113,6 +114,8 @@ ledattach(parent, self, aux)
sc->sc_node = ca->ca_ra.ra_node;
+ timeout_set(&sc->sc_to, led_cycle, sc);
+
if (CPU_ISSUN4M)
sc->sc_reg = mapiodev(&(ca->ca_ra.ra_reg[0]), 0,
ca->ca_ra.ra_reg[0].rr_len);
@@ -157,6 +160,6 @@ led_cycle(v)
if (sparc_led_blink != 0) {
s = (((averunnable.ldavg[0] + FSCALE) * hz) >> (FSHIFT + 3));
- timeout(led_cycle, sc, s);
+ timeout_add(&sc->sc_to, s);
}
}
diff --git a/sys/arch/sparc/dev/led.h b/sys/arch/sparc/dev/led.h
index f362de852f2..202d66cdbd6 100644
--- a/sys/arch/sparc/dev/led.h
+++ b/sys/arch/sparc/dev/led.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: led.h,v 1.3 1999/03/01 04:56:05 jason Exp $ */
+/* $OpenBSD: led.h,v 1.4 2001/01/30 03:55:10 jason Exp $ */
/*
* Copyright (c) 1998 Jason L. Wright (jason@thought.net)
@@ -40,6 +40,7 @@ struct led_softc {
int sc_node; /* which node */
u_int16_t * sc_reg; /* register (4/600) */
int sc_index; /* index into patterns */
+ struct timeout sc_to; /* timeout data */
};
extern struct led_softc *led_sc;