Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/dev/usb Destroy the reader callout on close, as discusse...



details:   https://anonhg.NetBSD.org/src/rev/e74024afc469
branches:  trunk
changeset: 781176:e74024afc469
user:      martin <martin%NetBSD.org@localhost>
date:      Fri Aug 24 13:14:19 2012 +0000

description:
Destroy the reader callout on close, as discussed back in may on current-users.

diffstat:

 sys/dev/usb/ulpt.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (28 lines):

diff -r b1b746753bb4 -r e74024afc469 sys/dev/usb/ulpt.c
--- a/sys/dev/usb/ulpt.c        Fri Aug 24 12:20:02 2012 +0000
+++ b/sys/dev/usb/ulpt.c        Fri Aug 24 13:14:19 2012 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ulpt.c,v 1.91 2012/03/11 01:06:07 mrg Exp $    */
+/*     $NetBSD: ulpt.c,v 1.92 2012/08/24 13:14:19 martin Exp $ */
 
 /*
  * Copyright (c) 1998, 2003 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.91 2012/03/11 01:06:07 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ulpt.c,v 1.92 2012/08/24 13:14:19 martin Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -572,7 +572,8 @@
 
        if (sc->sc_has_callout) {
                DPRINTFN(2, ("ulptclose: stopping read callout\n"));
-               callout_stop(&sc->sc_read_callout);
+               callout_halt(&sc->sc_read_callout, NULL);
+               callout_destroy(&sc->sc_read_callout);
                sc->sc_has_callout = 0;
        }
 



Home | Main Index | Thread Index | Old Index