--- //depot/vendor/freebsd/src/sys/pc98/cbus/olpt.c +++ //depot/user/jhb/cleanup/sys/pc98/cbus/olpt.c @@ -140,6 +140,7 @@ struct resource *res_port; struct resource *res_irq; void *sc_ih; + struct callout timer; int sc_port; short sc_state; @@ -319,6 +320,7 @@ 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 @@ 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 @@ 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;