Source-Changes-HG archive

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

[src/jmcneill-audiomp3]: src/sys/dev/isa don't attempt to obtain the intr mut...



details:   https://anonhg.NetBSD.org/src/rev/806e120632a4
branches:  jmcneill-audiomp3
changeset: 771389:806e120632a4
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Tue Nov 22 03:02:53 2011 +0000

description:
don't attempt to obtain the intr mutex again, only KASSERT we own it already

diffstat:

 sys/dev/isa/ad1848_isa.c |  13 +++++--------
 1 files changed, 5 insertions(+), 8 deletions(-)

diffs (51 lines):

diff -r d1762b8312cb -r 806e120632a4 sys/dev/isa/ad1848_isa.c
--- a/sys/dev/isa/ad1848_isa.c  Tue Nov 22 03:02:14 2011 +0000
+++ b/sys/dev/isa/ad1848_isa.c  Tue Nov 22 03:02:53 2011 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ad1848_isa.c,v 1.37.4.1 2011/11/19 21:49:37 jmcneill Exp $     */
+/*     $NetBSD: ad1848_isa.c,v 1.37.4.2 2011/11/22 03:02:53 jakllsch Exp $     */
 
 /*-
  * Copyright (c) 1999, 2008 The NetBSD Foundation, Inc.
@@ -95,7 +95,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ad1848_isa.c,v 1.37.4.1 2011/11/19 21:49:37 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ad1848_isa.c,v 1.37.4.2 2011/11/22 03:02:53 jakllsch Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -502,9 +502,8 @@
 #ifndef AUDIO_NO_POWER_CTL
        /* Power-up chip */
        if (isc->powerctl) {
-               mutex_spin_enter(&sc->sc_intr_lock);
+               KASSERT(mutex_owned(&sc->sc_intr_lock));
                isc->powerctl(isc->powerarg, flags);
-               mutex_spin_exit(&sc->sc_intr_lock);
        }
 #endif
 
@@ -515,9 +514,8 @@
        if (error) {
 #ifndef AUDIO_NO_POWER_CTL
                if (isc->powerctl) {
-                       mutex_spin_enter(&sc->sc_intr_lock);
+                       KASSERT(mutex_owned(&sc->sc_intr_lock));
                        isc->powerctl(isc->powerarg, 0);
-                       mutex_spin_exit(&sc->sc_intr_lock);
                }
 #endif
                goto bad;
@@ -549,9 +547,8 @@
 #ifndef AUDIO_NO_POWER_CTL
        /* Power-down chip */
        if (isc->powerctl) {
-               mutex_spin_enter(&sc->sc_intr_lock);
+               KASSERT(mutex_owned(&sc->sc_intr_lock));
                isc->powerctl(isc->powerarg, 0);
-               mutex_spin_exit(&sc->sc_intr_lock);
        }
 #endif
 



Home | Main Index | Thread Index | Old Index