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 | |
| parent | edb74239aa7ae5483dd11088d1496c000a9bc709 (diff) | |
'struct callout' => callout_t
don't use callout_reset()
do use callout_destroy()
Diffstat (limited to 'sys/dev')
| -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 | ||||
| -rw-r--r-- | sys/dev/pcmcia/btbc.c | 12 |
4 files changed, 23 insertions, 14 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 diff --git a/sys/dev/pcmcia/btbc.c b/sys/dev/pcmcia/btbc.c index 196f4258eb8..1252544cdcd 100644 --- a/sys/dev/pcmcia/btbc.c +++ b/sys/dev/pcmcia/btbc.c @@ -1,4 +1,4 @@ -/* $NetBSD: btbc.c,v 1.6 2007/11/03 17:41:04 plunky Exp $ */ +/* $NetBSD: btbc.c,v 1.7 2007/11/03 18:24:01 plunky Exp $ */ /* * Copyright (c) 2007 KIYOHARA Takashi * All rights reserved. @@ -30,7 +30,7 @@ */ #include <sys/cdefs.h> -__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.6 2007/11/03 17:41:04 plunky Exp $"); +__KERNEL_RCSID(0, "$NetBSD: btbc.c,v 1.7 2007/11/03 18:24:01 plunky Exp $"); #include <sys/param.h> #include <sys/callout.h> @@ -177,6 +177,7 @@ btbc_attach(device_t parent, device_t self, void *aux) btbc_power, sc); callout_init(&sc->sc_ledch, 0); + callout_setfunc(&sc->sc_ledch, btbc_activity_led_timeout, sc); return; } @@ -196,6 +197,7 @@ btbc_detach(device_t self, int flags) } callout_stop(&sc->sc_ledch); + callout_destroy(&sc->sc_ledch); hci_detach(&sc->sc_unit); @@ -276,16 +278,14 @@ btbc_enable_activity_led(struct btbc_softc *sc) BLUECARD_LEDCONTROL, 0x10 | 0x40); /* Stop the LED after hz/4 */ - callout_reset(&sc->sc_ledch, hz / 4, - btbc_activity_led_timeout, sc); + callout_schedule(&sc->sc_ledch, hz / 4); } else { /* Enable power LED */ bus_space_write_1(sc->sc_pcioh.iot, sc->sc_pcioh.ioh, BLUECARD_LEDCONTROL, 0x08 | 0x20); /* Stop the LED after HZ/2 */ - callout_reset(&sc->sc_ledch, hz / 2, - btbc_activity_led_timeout, sc); + callout_schedule(&sc->sc_ledch, hz / 2); } } |
