diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-25 00:05:00 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2000-07-25 00:05:00 +0000 |
commit | 3ae82c3a943cc3d48e51e29d1e8ac8e12442917b (patch) | |
tree | 49c6d8d1ea3c3961f52262aa1c2d5f86ac735d3b /sys/dev | |
parent | 76eb85ca193732f350422389bad4b476520bc8bc (diff) |
convert to new timeouts
Diffstat (limited to 'sys/dev')
-rw-r--r-- | sys/dev/pci/pccbb.c | 9 | ||||
-rw-r--r-- | sys/dev/pci/pccbbvar.h | 5 |
2 files changed, 9 insertions, 5 deletions
diff --git a/sys/dev/pci/pccbb.c b/sys/dev/pci/pccbb.c index 46671634288..0269453df6a 100644 --- a/sys/dev/pci/pccbb.c +++ b/sys/dev/pci/pccbb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbb.c,v 1.5 2000/07/06 19:49:10 aaron Exp $ */ +/* $OpenBSD: pccbb.c,v 1.6 2000/07/25 00:04:59 mickey Exp $ */ /* $NetBSD: pccbb.c,v 1.42 2000/06/16 23:41:35 cgd Exp $ */ /* @@ -487,6 +487,7 @@ pccbbattach(parent, self, aux) shutdownhook_establish(pccbb_shutdown, sc); + timeout_set(&sc->sc_ins_tmo, pci113x_insert, sc); #if 0 config_defer(self, pccbb_pci_callback); #endif @@ -946,9 +947,9 @@ pccbbintr(arg) */ (sc->sc_flags & CBB_CARDEXIST) == 0) { if (sc->sc_flags & CBB_INSERTING) { - untimeout(pci113x_insert, sc); + timeout_del(&sc->sc_ins_tmo); } - timeout(pci113x_insert, sc, hz / 10); + timeout_add(&sc->sc_ins_tmo, hz / 10); sc->sc_flags |= CBB_INSERTING; } } @@ -1049,7 +1050,7 @@ pci113x_insert(arg) /* who are you? */ } } else { - timeout(pci113x_insert, sc, hz / 10); + timeout_add(&sc->sc_ins_tmo, hz / 10); } } diff --git a/sys/dev/pci/pccbbvar.h b/sys/dev/pci/pccbbvar.h index e582eab3a93..f3d1f72e68d 100644 --- a/sys/dev/pci/pccbbvar.h +++ b/sys/dev/pci/pccbbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: pccbbvar.h,v 1.2 2000/07/06 19:49:11 aaron Exp $ */ +/* $OpenBSD: pccbbvar.h,v 1.3 2000/07/25 00:04:59 mickey Exp $ */ /* $NetBSD: pccbbvar.h,v 1.13 2000/06/08 10:28:29 haya Exp $ */ /* * Copyright (c) 1999 HAYAKAWA Koichi. All rights reserved. @@ -38,6 +38,8 @@ #ifndef _DEV_PCI_PCCBBVAR_H_ #define _DEV_PCI_PCCBBVAR_H_ +#include <sys/timeout.h> + #define PCIC_FLAG_SOCKETP 0x0001 #define PCIC_FLAG_CARDP 0x0002 @@ -118,6 +120,7 @@ struct pccbb_softc { bus_space_tag_t sc_base_memt; bus_space_handle_t sc_base_memh; + struct timeout sc_ins_tmo; void *sc_ih; /* interrupt handler */ int sc_intrline; /* interrupt line */ pcitag_t sc_intrtag; /* copy of pa->pa_intrtag */ |