summaryrefslogtreecommitdiff
path: root/sys/dev/pad
diff options
context:
space:
mode:
authornat <nat@NetBSD.org>2017-06-06 07:27:15 +0000
committernat <nat@NetBSD.org>2017-06-06 07:27:15 +0000
commitbbce9f18a4fbed6831be52de648f1937cf685ec1 (patch)
tree2221e633a8001695a2cfd5ba9157adf3c25a4a4b /sys/dev/pad
parent513ce5ddfca76029ec72ee12240a64ab76f3b554 (diff)
sc_bytes_count needs to be set in pad_audio_open not pad_open.
Diffstat (limited to 'sys/dev/pad')
-rw-r--r--sys/dev/pad/pad.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sys/dev/pad/pad.c b/sys/dev/pad/pad.c
index a883ce295ff..6450a245b16 100644
--- a/sys/dev/pad/pad.c
+++ b/sys/dev/pad/pad.c
@@ -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>
@@ -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, struct lwp *l)
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;