summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2001-08-23 08:17:41 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2001-08-23 08:17:41 +0000
commitfb81a5da1cffa41d5c0c24ca1d33f0148f3ae892 (patch)
tree6e3c4f213fed8663bdd8a53cf77963881d05f0de
parent03c64cac4f66eefa29a1bb18e082e854e224eca5 (diff)
Convert the last old-timeout, tested by beck@
-rw-r--r--sys/arch/mac68k/dev/asc.c6
-rw-r--r--sys/arch/mac68k/dev/ascvar.h3
2 files changed, 6 insertions, 3 deletions
diff --git a/sys/arch/mac68k/dev/asc.c b/sys/arch/mac68k/dev/asc.c
index 07e2a3618b0..4c7a5d700ab 100644
--- a/sys/arch/mac68k/dev/asc.c
+++ b/sys/arch/mac68k/dev/asc.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: asc.c,v 1.10 2001/06/08 08:08:58 art Exp $ */
+/* $OpenBSD: asc.c,v 1.11 2001/08/23 08:17:40 miod Exp $ */
/* $NetBSD: asc.c,v 1.20 1997/02/24 05:47:33 scottr Exp $ */
/*
@@ -76,6 +76,7 @@
#include <sys/param.h>
#include <sys/device.h>
#include <sys/fcntl.h>
+#include <sys/timeout.h>
#include <vm/vm.h>
#include <vm/pmap.h>
@@ -172,6 +173,7 @@ ascattach(parent, self, aux)
printf(" at %x", oa->oa_addr);
printf("\n");
+ timeout_set(&sc->sc_bell_tmo, asc_stop_bell, sc);
mac68k_set_bell_callback(asc_ring_bell, sc);
}
@@ -335,7 +337,7 @@ asc_ring_bell(arg, freq, length, volume)
bus_space_write_1(sc->sc_tag, sc->sc_handle, 0x801, 2); /* enable sampled */
}
sc->sc_ringing++;
- timeout(asc_stop_bell, sc, length);
+ timeout_add(&sc->sc_bell_tmo, length);
return (0);
}
diff --git a/sys/arch/mac68k/dev/ascvar.h b/sys/arch/mac68k/dev/ascvar.h
index 75c76ba6e69..e850f83707e 100644
--- a/sys/arch/mac68k/dev/ascvar.h
+++ b/sys/arch/mac68k/dev/ascvar.h
@@ -1,4 +1,4 @@
-/* $OpenBSD: ascvar.h,v 1.2 1997/03/08 16:16:49 briggs Exp $ */
+/* $OpenBSD: ascvar.h,v 1.3 2001/08/23 08:17:40 miod Exp $ */
/* $NetBSD: ascvar.h,v 1.3 1997/02/24 05:47:34 scottr Exp $ */
/*
@@ -39,6 +39,7 @@ struct asc_softc {
bus_space_handle_t sc_handle;
int sc_open;
int sc_ringing;
+ struct timeout sc_bell_tmo;
};
int ascopen __P((dev_t dev, int flag, int mode, struct proc *p));