diff options
author | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-10 10:15:36 +0000 |
---|---|---|
committer | Marc Balmer <mbalmer@cvs.openbsd.org> | 2007-06-10 10:15:36 +0000 |
commit | ba9346211f99b37c96aa619b9981b230c7b4a61d (patch) | |
tree | ccdeec5702822686e8702f14d705203c1db83ac3 /sys/dev/usb/if_axe.c | |
parent | e306807c0defd347a543fa24bbd4d248729fe129 (diff) |
Remove definitions and usage of usb_callout and related macros. These macros
were used as a layer of confusion^Wabstraction around the timeout(9) API.
No binary change.
ok jsg.
Diffstat (limited to 'sys/dev/usb/if_axe.c')
-rw-r--r-- | sys/dev/usb/if_axe.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/dev/usb/if_axe.c b/sys/dev/usb/if_axe.c index 8a877c9b2bd..a6b3b51be71 100644 --- a/sys/dev/usb/if_axe.c +++ b/sys/dev/usb/if_axe.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_axe.c,v 1.71 2007/06/09 12:22:53 mbalmer Exp $ */ +/* $OpenBSD: if_axe.c,v 1.72 2007/06/10 10:15:35 mbalmer Exp $ */ /* * Copyright (c) 2005, 2006, 2007 Jonathan Gray <jsg@openbsd.org> @@ -714,7 +714,7 @@ axe_attach(struct device *parent, struct device *self, void *aux) if_attach(ifp); ether_ifattach(ifp); - usb_callout_init(sc->axe_stat_ch); + timeout_set(&sc->axe_stat_ch, NULL, NULL); sc->axe_attached = 1; splx(s); @@ -736,7 +736,7 @@ axe_detach(struct device *self, int flags) if (!sc->axe_attached) return (0); - usb_uncallout(sc->axe_stat_ch, axe_tick, sc); + timeout_del(&sc->axe_stat_ch); sc->axe_dying = 1; @@ -1111,7 +1111,9 @@ axe_tick_task(void *xsc) axe_start(ifp); } - usb_callout(sc->axe_stat_ch, hz, axe_tick, sc); + timeout_del(&sc->axe_stat_ch); + timeout_set(&sc->axe_stat_ch, axe_tick, sc); + timeout_add(&sc->axe_stat_ch, hz); splx(s); } @@ -1310,7 +1312,9 @@ axe_init(void *xsc) splx(s); - usb_callout(sc->axe_stat_ch, hz, axe_tick, sc); + timeout_del(&sc->axe_stat_ch); + timeout_set(&sc->axe_stat_ch, axe_tick, sc); + timeout_add(&sc->axe_stat_ch, hz); return; } @@ -1438,7 +1442,7 @@ axe_stop(struct axe_softc *sc) ifp->if_timer = 0; ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); - usb_uncallout(sc->axe_stat_ch, axe_tick, sc); + timeout_del(&sc->axe_stat_ch); /* Stop transfers. */ if (sc->axe_ep[AXE_ENDPT_RX] != NULL) { |