summaryrefslogtreecommitdiff
path: root/sys/dev/usb/if_aue.c
diff options
context:
space:
mode:
authorMarc Balmer <mbalmer@cvs.openbsd.org>2007-11-23 15:43:03 +0000
committerMarc Balmer <mbalmer@cvs.openbsd.org>2007-11-23 15:43:03 +0000
commitc1c4b626b699581b962cfad225cc35995f811251 (patch)
tree182988f9093b3f2c927fe6cf9d2d23199a20de4a /sys/dev/usb/if_aue.c
parentfc18ac9085d0963e9ca450f94e6bf954e9f30ef9 (diff)
Sanitize the use of timeouts:
Instead of calling timeout_set(..., NULL, NULL) in attach routines and later timeout_del(...) timeout_set(..., func, arg) timeout_add(..., time) set the function and argument in the initial timeout_set() call and only use timeout_add(..., time) later. ok dlg, fgsch, krw, winiger
Diffstat (limited to 'sys/dev/usb/if_aue.c')
-rw-r--r--sys/dev/usb/if_aue.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/sys/dev/usb/if_aue.c b/sys/dev/usb/if_aue.c
index 7743e2bfda6..4ab7ab02160 100644
--- a/sys/dev/usb/if_aue.c
+++ b/sys/dev/usb/if_aue.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if_aue.c,v 1.68 2007/11/10 22:58:24 deraadt Exp $ */
+/* $OpenBSD: if_aue.c,v 1.69 2007/11/23 15:43:02 mbalmer Exp $ */
/* $NetBSD: if_aue.c,v 1.82 2003/03/05 17:37:36 shiba Exp $ */
/*
* Copyright (c) 1997, 1998, 1999, 2000
@@ -830,7 +830,7 @@ aue_attach(struct device *parent, struct device *self, void *aux)
if_attach(ifp);
ether_ifattach(ifp);
- timeout_set(&sc->aue_stat_ch, NULL, NULL);
+ timeout_set(&sc->aue_stat_ch, aue_tick, sc);
sc->aue_attached = 1;
sc->sc_sdhook = shutdownhook_establish(aue_shutdown, sc);
@@ -1245,8 +1245,6 @@ aue_tick_task(void *xsc)
aue_start(ifp);
}
- timeout_del(&sc->aue_stat_ch);
- timeout_set(&sc->aue_stat_ch, aue_tick, sc);
timeout_add(&sc->aue_stat_ch, hz);
splx(s);
@@ -1417,8 +1415,6 @@ aue_init(void *xsc)
splx(s);
- timeout_del(&sc->aue_stat_ch);
- timeout_set(&sc->aue_stat_ch, aue_tick, sc);
timeout_add(&sc->aue_stat_ch, hz);
}