Module Name:    src
Committed By:   riz
Date:           Fri Feb 24 16:27:53 UTC 2012

Modified Files:
        src/sys/arch/hp700/gsc [netbsd-6]: harmony.c

Log Message:
Pull up following revision(s) (requested by skrll in ticket #41):
        sys/arch/hp700/gsc/harmony.c: revision 1.27
Don't take sc_intr_lock in harmony_trigger_input it's already taken by
our caller.
Found by /usr/tests/include/t_paths.


To generate a diff of this commit:
cvs rdiff -u -r1.26 -r1.26.2.1 src/sys/arch/hp700/gsc/harmony.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/arch/hp700/gsc/harmony.c
diff -u src/sys/arch/hp700/gsc/harmony.c:1.26 src/sys/arch/hp700/gsc/harmony.c:1.26.2.1
--- src/sys/arch/hp700/gsc/harmony.c:1.26	Thu Feb  2 19:42:59 2012
+++ src/sys/arch/hp700/gsc/harmony.c	Fri Feb 24 16:27:53 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: harmony.c,v 1.26 2012/02/02 19:42:59 tls Exp $	*/
+/*	$NetBSD: harmony.c,v 1.26.2.1 2012/02/24 16:27:53 riz Exp $	*/
 
 /*	$OpenBSD: harmony.c,v 1.23 2004/02/13 21:28:19 mickey Exp $	*/
 
@@ -1259,12 +1259,12 @@ int
 harmony_trigger_input(void *vsc, void *start, void *end, int blksize,
     void (*intr)(void *), void *intrarg, const audio_params_t *param)
 {
-	struct harmony_softc *sc;
-	struct harmony_channel *c;
+	struct harmony_softc *sc = vsc;
+	struct harmony_channel *c = &sc->sc_capture;
 	struct harmony_dma *d;
 
-	sc = vsc;
-	c = &sc->sc_capture;
+	KASSERT(mutex_owned(&sc->sc_intr_lock));
+
 	for (d = sc->sc_dmas; d->d_kva != start; d = d->d_next)
 		continue;
 	if (d == NULL) {
@@ -1273,8 +1273,6 @@ harmony_trigger_input(void *vsc, void *s
 		return EINVAL;
 	}
 
-	mutex_spin_enter(&sc->sc_intr_lock);
-
 	c->c_intr = intr;
 	c->c_intrarg = intrarg;
 	c->c_blksz = blksize;
@@ -1288,8 +1286,6 @@ harmony_trigger_input(void *vsc, void *s
 	harmony_start_cp(sc, 1);
 	harmony_intr_enable(sc);
 
-	mutex_spin_exit(&sc->sc_intr_lock);
-
 	return 0;
 }
 

Reply via email to