diff options
author | jhb <jhb@FreeBSD.org> | 2014-09-25 18:54:36 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2014-09-25 18:54:36 +0000 |
commit | 1cafd48c74f9303040602cb053d2071e3e825440 (patch) | |
tree | 96c21fb4ff7b192e298ab2c5903dfae758d43c91 /sys/pc98/cbus | |
parent | 98e5bb3d6cb3dc64936b6501d599a6ccd2ac5b71 (diff) | |
download | FreeBSD-src-1cafd48c74f9303040602cb053d2071e3e825440.zip FreeBSD-src-1cafd48c74f9303040602cb053d2071e3e825440.tar.gz |
Use callout(9) instead of timeout(9).
Approved by: nyan
Diffstat (limited to 'sys/pc98/cbus')
-rw-r--r-- | sys/pc98/cbus/olpt.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/sys/pc98/cbus/olpt.c b/sys/pc98/cbus/olpt.c index 2423d6e..9aa8212 100644 --- a/sys/pc98/cbus/olpt.c +++ b/sys/pc98/cbus/olpt.c @@ -140,6 +140,7 @@ struct lpt_softc { struct resource *res_port; struct resource *res_irq; void *sc_ih; + struct callout timer; int sc_port; short sc_state; @@ -319,6 +320,7 @@ lpt_attach(device_t dev) unit = device_get_unit(dev); sc = device_get_softc(dev); + callout_init(&sc->timer, 0); rid = 0; sc->res_port = isa_alloc_resourcev(dev, SYS_RES_IOPORT, &rid, @@ -418,8 +420,8 @@ lptopen (struct cdev *dev, int flags, int fmt, struct thread *td) lprintf(("irq %x\n", sc->sc_irq)); if (sc->sc_irq & LP_USE_IRQ) { sc->sc_state |= TOUT; - timeout (lptout, (caddr_t)sc, - (sc->sc_backoff = hz/LPTOUTINITIAL)); + sc->sc_backoff = hz / LPTOUTINITIAL;; + callout_reset(&sc->timer, sc->sc_backoff, lptout, sc); } lprintf(("opened.\n")); @@ -437,7 +439,7 @@ lptout (void *arg) sc->sc_backoff++; if (sc->sc_backoff > hz/LPTOUTMAX) sc->sc_backoff = sc->sc_backoff > hz/LPTOUTMAX; - timeout (lptout, (caddr_t)sc, sc->sc_backoff); + callout_reset(&sc->timer, sc->sc_backoff, lptout, sc); } else sc->sc_state &= ~TOUT; |