diff options
author | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-03 06:33:38 +0000 |
---|---|---|
committer | Michael Shalayeff <mickey@cvs.openbsd.org> | 2001-02-03 06:33:38 +0000 |
commit | 57ebf5c41f2e6f6b60b36d51c636af5eb6ab510a (patch) | |
tree | a07b6d59c5656518f335f9864145a905e8e8ef2f | |
parent | 43999dbba8a74ff5caf17d27ebbf21e175af6e64 (diff) |
new timeouts
-rw-r--r-- | sys/dev/ic/cy.c | 7 | ||||
-rw-r--r-- | sys/dev/ic/cyreg.h | 5 |
2 files changed, 8 insertions, 4 deletions
diff --git a/sys/dev/ic/cy.c b/sys/dev/ic/cy.c index 0ff584d4346..6e3d2b42b50 100644 --- a/sys/dev/ic/cy.c +++ b/sys/dev/ic/cy.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cy.c,v 1.10 2000/12/10 11:12:00 deraadt Exp $ */ +/* $OpenBSD: cy.c,v 1.11 2001/02/03 06:33:37 mickey Exp $ */ /* * cy.c @@ -224,6 +224,7 @@ cyattach(parent, self, aux) #endif } + timeout_set(&sc->sc_tmo, cy_poll, NULL); bzero(sc->sc_ports, sizeof(sc->sc_ports)); sc->sc_nports = num_chips * CD1400_NO_OF_CHANNELS; @@ -408,7 +409,7 @@ cyopen(dev, flag, mode, p) if(cy_open == 0) { cy_open = 1; - timeout(cy_poll, NULL, 1); + timeout_add(&sc->sc_tmo, 1); } /* this sets parameters and raises DTR */ @@ -1150,7 +1151,7 @@ cy_poll(arg) counter = 0; out: - timeout(cy_poll, NULL, 1); + timeout_add(&sc->sc_tmo, 1); } /* diff --git a/sys/dev/ic/cyreg.h b/sys/dev/ic/cyreg.h index 3d6d43b2387..06261319bc6 100644 --- a/sys/dev/ic/cyreg.h +++ b/sys/dev/ic/cyreg.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cyreg.h,v 1.3 2000/12/10 11:12:01 deraadt Exp $ */ +/* $OpenBSD: cyreg.h,v 1.4 2001/02/03 06:33:37 mickey Exp $ */ /* $FreeBSD: cyreg.h,v 1.1 1995/07/05 12:15:51 bde Exp $ */ /*- @@ -32,6 +32,8 @@ * SUCH DAMAGE. */ +#include <sys/timeout.h> + /* * Definitions for Cyclades Cyclom-Y serial boards. */ @@ -160,6 +162,7 @@ struct cy_port { struct cy_softc { struct device sc_dev; void *sc_ih; + struct timeout sc_tmo; bus_space_tag_t sc_memt; bus_space_handle_t sc_memh; int sc_bustype; |