From fb81a5da1cffa41d5c0c24ca1d33f0148f3ae892 Mon Sep 17 00:00:00 2001 From: Miod Vallat Date: Thu, 23 Aug 2001 08:17:41 +0000 Subject: Convert the last old-timeout, tested by beck@ --- sys/arch/mac68k/dev/asc.c | 6 ++++-- sys/arch/mac68k/dev/ascvar.h | 3 ++- 2 files changed, 6 insertions(+), 3 deletions(-) (limited to 'sys') 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 #include #include +#include #include #include @@ -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)); -- cgit v1.2.3