Source-Changes-HG archive

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

[src/netbsd-6]: src/sys/arch/hp700/gsc Pull up following revision(s) (request...



details:   https://anonhg.NetBSD.org/src/rev/6f796e528a25
branches:  netbsd-6
changeset: 773814:6f796e528a25
user:      riz <riz%NetBSD.org@localhost>
date:      Fri Feb 24 16:27:53 2012 +0000

description:
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.

diffstat:

 sys/arch/hp700/gsc/harmony.c |  14 +++++---------
 1 files changed, 5 insertions(+), 9 deletions(-)

diffs (44 lines):

diff -r a9226eea174b -r 6f796e528a25 sys/arch/hp700/gsc/harmony.c
--- a/sys/arch/hp700/gsc/harmony.c      Fri Feb 24 06:12:57 2012 +0000
+++ b/sys/arch/hp700/gsc/harmony.c      Fri Feb 24 16:27:53 2012 +0000
@@ -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 @@
 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 @@
                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_start_cp(sc, 1);
        harmony_intr_enable(sc);
 
-       mutex_spin_exit(&sc->sc_intr_lock);
-
        return 0;
 }
 



Home | Main Index | Thread Index | Old Index