Module Name: src
Committed By: nat
Date: Tue Jun 6 07:27:15 UTC 2017
Modified Files:
src/sys/dev/pad: pad.c
Log Message:
sc_bytes_count needs to be set in pad_audio_open not pad_open.
To generate a diff of this commit:
cvs rdiff -u -r1.33 -r1.34 src/sys/dev/pad/pad.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/sys/dev/pad/pad.c
diff -u src/sys/dev/pad/pad.c:1.33 src/sys/dev/pad/pad.c:1.34
--- src/sys/dev/pad/pad.c:1.33 Tue Jun 6 07:18:38 2017
+++ src/sys/dev/pad/pad.c Tue Jun 6 07:27:15 2017
@@ -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 <[email protected]>
@@ -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 @@ pad_open(dev_t dev, int flags, int fmt,
return EBUSY;
}
- getmicrotime(&sc->sc_last);
- sc->sc_bytes_count = 0;
- sc->sc_remainder = 0;
-
return 0;
}
@@ -438,6 +434,7 @@ pad_audio_open(void *opaque, int flags)
return EIO;
getmicrotime(&sc->sc_last);
+ sc->sc_bytes_count = 0;
sc->sc_remainder = 0;
return 0;