From owner-svn-src-all@FreeBSD.ORG Thu Sep 25 18:54:37 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 466109BD; Thu, 25 Sep 2014 18:54:37 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3196EE7F; Thu, 25 Sep 2014 18:54:37 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8PIsbmL034206; Thu, 25 Sep 2014 18:54:37 GMT (envelope-from jhb@FreeBSD.org) Received: (from jhb@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8PIsbcA034205; Thu, 25 Sep 2014 18:54:37 GMT (envelope-from jhb@FreeBSD.org) Message-Id: <201409251854.s8PIsbcA034205@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: jhb set sender to jhb@FreeBSD.org using -f From: John Baldwin Date: Thu, 25 Sep 2014 18:54:37 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r272124 - head/sys/pc98/cbus X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 25 Sep 2014 18:54:37 -0000 Author: jhb Date: Thu Sep 25 18:54:36 2014 New Revision: 272124 URL: http://svnweb.freebsd.org/changeset/base/272124 Log: Use callout(9) instead of timeout(9). Approved by: nyan Modified: head/sys/pc98/cbus/olpt.c Modified: head/sys/pc98/cbus/olpt.c ============================================================================== --- head/sys/pc98/cbus/olpt.c Thu Sep 25 18:53:27 2014 (r272123) +++ head/sys/pc98/cbus/olpt.c Thu Sep 25 18:54:36 2014 (r272124) @@ -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, in 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;