diff options
| author | plunky <plunky@NetBSD.org> | 2007-11-03 18:24:00 +0000 |
|---|---|---|
| committer | plunky <plunky@NetBSD.org> | 2007-11-03 18:24:00 +0000 |
| commit | faccfc336cccb7a31587d48f1ebd60a8a0868025 (patch) | |
| tree | 58ec49ef7eda716b554edc5fda9c8c4da48d5e02 /sys/dev/bluetooth | |
| parent | edb74239aa7ae5483dd11088d1496c000a9bc709 (diff) | |
'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
Diffstat (limited to 'sys/dev/bluetooth')
| -rw-r--r-- | sys/dev/bluetooth/bcsp.c | 10 | ||||
| -rw-r--r-- | sys/dev/bluetooth/bthidev.c | 8 | ||||
| -rw-r--r-- | sys/dev/bluetooth/btkbd.c | 7 |
3 files changed, 17 insertions, 8 deletions
diff --git a/sys/dev/bluetooth/bcsp.c b/sys/dev/bluetooth/bcsp.c index 0d3d176b16c..08ba3473195 100644 --- a/sys/dev/bluetooth/bcsp.c +++ b/sys/dev/bluetooth/bcsp.c @@ -1,4 +1,4 @@ -/* $NetBSD: bcsp.c,v 1.4 2007/11/03 17:41:03 plunky Exp $ */ +/* $NetBSD: bcsp.c,v 1.5 2007/11/03 18:24:00 plunky Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -26,7 +26,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.4 2007/11/03 17:41:03 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bcsp.c,v 1.5 2007/11/03 18:24:00 plunky Exp $"); #include <sys/types.h> #include <sys/param.h> @@ -332,6 +332,12 @@ bcsp_detach(struct device *self, int flags __unused) hci_detach(&sc->sc_unit); + callout_stop(&sc->sc_seq_timer); + callout_destroy(&sc->sc_seq_timer); + + callout_stop(&sc->sc_le_timer); + callout_destroy(&sc->sc_le_timer); + return 0; } diff --git a/sys/dev/bluetooth/bthidev.c b/sys/dev/bluetooth/bthidev.c index dd666b8eeea..7c62723ee2b 100644 --- a/sys/dev/bluetooth/bthidev.c +++ b/sys/dev/bluetooth/bthidev.c @@ -1,4 +1,4 @@ -/* $NetBSD: bthidev.c,v 1.10 2007/11/03 17:41:03 plunky Exp $ */ +/* $NetBSD: bthidev.c,v 1.11 2007/11/03 18:24:01 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -32,7 +32,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.10 2007/11/03 17:41:03 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: bthidev.c,v 1.11 2007/11/03 18:24:01 plunky Exp $"); #include <sys/param.h> #include <sys/conf.h> @@ -85,7 +85,7 @@ struct bthidev_softc { LIST_HEAD(,bthidev) sc_list; /* child list */ - struct callout sc_reconnect; + callout_t sc_reconnect; int sc_attempts; /* connection attempts */ }; @@ -354,6 +354,8 @@ bthidev_detach(device_t self, int flags) if (callout_invoking(&sc->sc_reconnect)) tsleep(sc, PWAIT, "bthidetach", 0); + callout_destroy(&sc->sc_reconnect); + splx(s); /* detach children */ diff --git a/sys/dev/bluetooth/btkbd.c b/sys/dev/bluetooth/btkbd.c index 01573629c6f..5628b7d6bee 100644 --- a/sys/dev/bluetooth/btkbd.c +++ b/sys/dev/bluetooth/btkbd.c @@ -1,4 +1,4 @@ -/* $NetBSD: btkbd.c,v 1.8 2007/11/03 17:41:03 plunky Exp $ */ +/* $NetBSD: btkbd.c,v 1.9 2007/11/03 18:24:01 plunky Exp $ */ /*- * Copyright (c) 2006 Itronix Inc. @@ -36,7 +36,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.8 2007/11/03 17:41:03 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btkbd.c,v 1.9 2007/11/03 18:24:01 plunky Exp $"); #include <sys/param.h> #include <sys/callout.h> @@ -106,7 +106,7 @@ struct btkbd_softc { #ifdef WSDISPLAY_COMPAT_RAWKBD int sc_rawkbd; #ifdef BTKBD_REPEAT - struct callout sc_repeat; + callout_t sc_repeat; int sc_nrep; char sc_rep[MAXKEYS]; #endif @@ -219,6 +219,7 @@ btkbd_detach(device_t self, int flags) #ifdef BTKBD_REPEAT callout_stop(&sc->sc_repeat); KASSERT(!callout_invoking(&sc->sc_repeat)); + callout_destroy(&sc->sc_repeat); #endif #endif |
