From 299d77765f417e3a779dd9cd6e906cc968af3cc7 Mon Sep 17 00:00:00 2001 From: Michael Knudsen Date: Thu, 22 May 2008 19:23:05 +0000 Subject: More timeout(9) usage cleaned up. ok claudio --- sys/dev/ic/i82365.c | 5 ++--- sys/dev/isa/aps.c | 5 ++--- sys/dev/pci/if_txp.c | 5 ++--- sys/dev/pci/if_vge.c | 6 +++--- sys/dev/pci/if_vr.c | 5 ++--- sys/dev/pci/nofn.c | 5 ++--- sys/dev/pci/pccbb.c | 5 +---- 7 files changed, 14 insertions(+), 22 deletions(-) (limited to 'sys/dev') diff --git a/sys/dev/ic/i82365.c b/sys/dev/ic/i82365.c index 157c5d26523..e96df2cab3d 100644 --- a/sys/dev/ic/i82365.c +++ b/sys/dev/ic/i82365.c @@ -1,4 +1,4 @@ -/* $OpenBSD: i82365.c,v 1.26 2007/11/25 16:40:04 jmc Exp $ */ +/* $OpenBSD: i82365.c,v 1.27 2008/05/22 19:23:04 mk Exp $ */ /* $NetBSD: i82365.c,v 1.10 1998/06/09 07:36:55 thorpej Exp $ */ /* @@ -838,8 +838,7 @@ pcic_power(why, arg) struct pcic_event *pe; if (why != PWR_RESUME) { - if (timeout_pending(&sc->poll_timeout)) - timeout_del(&sc->poll_timeout); + timeout_del(&sc->poll_timeout); } else { pcic_intr_socket(h); diff --git a/sys/dev/isa/aps.c b/sys/dev/isa/aps.c index 03bd0089b53..043b082618f 100644 --- a/sys/dev/isa/aps.c +++ b/sys/dev/isa/aps.c @@ -1,4 +1,4 @@ -/* $OpenBSD: aps.c,v 1.15 2007/05/19 19:14:11 tedu Exp $ */ +/* $OpenBSD: aps.c,v 1.16 2008/05/22 19:23:04 mk Exp $ */ /* * Copyright (c) 2005 Jonathan Gray * @@ -392,8 +392,7 @@ aps_power(int why, void *arg) bus_space_handle_t ioh = sc->aps_ioh; if (why != PWR_RESUME) { - if (timeout_pending(&aps_timeout)) - timeout_del(&aps_timeout); + timeout_del(&aps_timeout); } else { /* * Redo the init sequence on resume, because APS is diff --git a/sys/dev/pci/if_txp.c b/sys/dev/pci/if_txp.c index dd6e9849ae1..043e5073810 100644 --- a/sys/dev/pci/if_txp.c +++ b/sys/dev/pci/if_txp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_txp.c,v 1.88 2008/05/22 06:48:56 brad Exp $ */ +/* $OpenBSD: if_txp.c,v 1.89 2008/05/22 19:23:04 mk Exp $ */ /* * Copyright (c) 2001 @@ -1773,8 +1773,7 @@ txp_stop(sc) txp_command(sc, TXP_CMD_TX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); txp_command(sc, TXP_CMD_RX_DISABLE, 0, 0, 0, NULL, NULL, NULL, 1); - if (timeout_pending(&sc->sc_tick)) - timeout_del(&sc->sc_tick); + timeout_del(&sc->sc_tick); } void diff --git a/sys/dev/pci/if_vge.c b/sys/dev/pci/if_vge.c index 501ed391e6e..fe9cb212169 100644 --- a/sys/dev/pci/if_vge.c +++ b/sys/dev/pci/if_vge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vge.c,v 1.36 2008/05/13 01:40:39 brad Exp $ */ +/* $OpenBSD: if_vge.c,v 1.37 2008/05/22 19:23:04 mk Exp $ */ /* $FreeBSD: if_vge.c,v 1.3 2004/09/11 22:13:25 wpaul Exp $ */ /* * Copyright (c) 2004 @@ -1810,8 +1810,8 @@ vge_stop(struct vge_softc *sc) ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; - if (timeout_pending(&sc->timer_handle)) - timeout_del(&sc->timer_handle); + + timeout_del(&sc->timer_handle); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/dev/pci/if_vr.c b/sys/dev/pci/if_vr.c index 2834cbf3eb8..9394ba4dbef 100644 --- a/sys/dev/pci/if_vr.c +++ b/sys/dev/pci/if_vr.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_vr.c,v 1.72 2008/02/07 16:04:01 thib Exp $ */ +/* $OpenBSD: if_vr.c,v 1.73 2008/05/22 19:23:04 mk Exp $ */ /* * Copyright (c) 1997, 1998 @@ -1464,8 +1464,7 @@ vr_stop(struct vr_softc *sc) ifp = &sc->arpcom.ac_if; ifp->if_timer = 0; - if (timeout_pending(&sc->sc_to)) - timeout_del(&sc->sc_to); + timeout_del(&sc->sc_to); ifp->if_flags &= ~(IFF_RUNNING | IFF_OACTIVE); diff --git a/sys/dev/pci/nofn.c b/sys/dev/pci/nofn.c index 35ca1d69996..0b40d3db35d 100644 --- a/sys/dev/pci/nofn.c +++ b/sys/dev/pci/nofn.c @@ -1,4 +1,4 @@ -/* $OpenBSD: nofn.c,v 1.15 2006/06/29 21:34:51 deraadt Exp $ */ +/* $OpenBSD: nofn.c,v 1.16 2008/05/22 19:23:04 mk Exp $ */ /* * Copyright (c) 2002 Jason L. Wright (jason@thought.net) @@ -281,8 +281,7 @@ nofn_rng_disable(sc) switch (sc->sc_revid) { case REVID_7814_7854_1: - if (timeout_pending(&sc->sc_rngto)) - timeout_del(&sc->sc_rngto); + timeout_del(&sc->sc_rngto); break; case REVID_8154_1: case REVID_8065_1: diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 8c88e81a077..3e20f703e91 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.59 2007/12/20 13:59:27 kettenis Exp $ */ +/* $OpenBSD: pccbb.c,v 1.60 2008/05/22 19:23:04 mk Exp $ */ /* $NetBSD: pccbb.c,v 1.96 2004/03/28 09:49:31 nakayama Exp $ */ /* @@ -1011,9 +1011,6 @@ pccbbintr(arg) * insertion/removal during suspension. */ (sc->sc_flags & CBB_CARDEXIST) == 0) { - if (sc->sc_flags & CBB_INSERTING) { - timeout_del(&sc->sc_ins_tmo); - } timeout_add(&sc->sc_ins_tmo, hz / 10); sc->sc_flags |= CBB_INSERTING; } -- cgit v1.2.3