Source-Changes-HG archive

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

[src/trunk]: src/sys/dev/pad sc_bytes_count needs to be set in pad_audio_open...



details:   https://anonhg.NetBSD.org/src/rev/48930ceb0384
branches:  trunk
changeset: 354173:48930ceb0384
user:      nat <nat%NetBSD.org@localhost>
date:      Tue Jun 06 07:27:15 2017 +0000

description:
sc_bytes_count needs to be set in pad_audio_open not pad_open.

diffstat:

 sys/dev/pad/pad.c |  9 +++------
 1 files changed, 3 insertions(+), 6 deletions(-)

diffs (37 lines):

diff -r 7f9768cdb703 -r 48930ceb0384 sys/dev/pad/pad.c
--- a/sys/dev/pad/pad.c Tue Jun 06 07:18:38 2017 +0000
+++ b/sys/dev/pad/pad.c Tue Jun 06 07:27:15 2017 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pad.c,v 1.33 2017/06/06 07:18:38 nat Exp $ */
+/* $NetBSD: pad.c,v 1.34 2017/06/06 07:27:15 nat Exp $ */
 
 /*-
  * Copyright (c) 2007 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.33 2017/06/06 07:18:38 nat Exp $");
+__KERNEL_RCSID(0, "$NetBSD: pad.c,v 1.34 2017/06/06 07:27:15 nat Exp $");
 
 #include <sys/types.h>
 #include <sys/param.h>
@@ -322,10 +322,6 @@
                return EBUSY;
        }
        
-       getmicrotime(&sc->sc_last);
-       sc->sc_bytes_count = 0;
-       sc->sc_remainder = 0;
-
        return 0;
 }
 
@@ -438,6 +434,7 @@
                return EIO;
 
        getmicrotime(&sc->sc_last);
+       sc->sc_bytes_count = 0;
        sc->sc_remainder = 0;
 
        return 0;



Home | Main Index | Thread Index | Old Index