Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/usb Set the open flag when opening the scanner.



details:   https://anonhg.NetBSD.org/src/rev/21a8fd2810cf
branches:  trunk
changeset: 499196:21a8fd2810cf
user:      augustss <augustss%NetBSD.org@localhost>
date:      Tue Nov 14 13:57:16 2000 +0000

description:
Set the open flag when opening the scanner.

diffstat:

 sys/dev/usb/uscanner.c |  6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 117224c736d2 -r 21a8fd2810cf sys/dev/usb/uscanner.c
--- a/sys/dev/usb/uscanner.c    Tue Nov 14 13:27:49 2000 +0000
+++ b/sys/dev/usb/uscanner.c    Tue Nov 14 13:57:16 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uscanner.c,v 1.8 2000/11/03 04:00:15 augustss Exp $    */
+/*     $NetBSD: uscanner.c,v 1.9 2000/11/14 13:57:16 augustss Exp $    */
 /*     $FreeBSD$       */
 
 /*
@@ -338,6 +338,8 @@
        if (sc->sc_state & USCANNER_OPEN)
                return (EBUSY);
 
+       sc->sc_state |= USCANNER_OPEN;
+
        sc->sc_bulkin_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK);
        sc->sc_bulkout_buffer = malloc(USCANNER_BUFFERSIZE, M_USBDEV, M_WAITOK);
        /* No need to check buffers for NULL since we have WAITOK */
@@ -400,7 +402,7 @@
 
        uscanner_do_close(sc);
 
-       return 0;
+       return (0);
 }
 
 void



Home | Main Index | Thread Index | Old Index