Module Name: src
Committed By: mrg
Date: Sun Nov 20 08:39:59 UTC 2011
Modified Files:
src/sys/dev/ic [jmcneill-audiomp3]: opl.c
Log Message:
XXX: don't KASSERT() if sc->lock is NULL, this is going to happen
XXX: during autoconfig match() where we've faked up a sc anyway.
To generate a diff of this commit:
cvs rdiff -u -r1.37.14.1 -r1.37.14.2 src/sys/dev/ic/opl.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/ic/opl.c
diff -u src/sys/dev/ic/opl.c:1.37.14.1 src/sys/dev/ic/opl.c:1.37.14.2
--- src/sys/dev/ic/opl.c:1.37.14.1 Sat Nov 19 21:49:37 2011
+++ src/sys/dev/ic/opl.c Sun Nov 20 08:39:59 2011
@@ -1,4 +1,4 @@
-/* $NetBSD: opl.c,v 1.37.14.1 2011/11/19 21:49:37 jmcneill Exp $ */
+/* $NetBSD: opl.c,v 1.37.14.2 2011/11/20 08:39:59 mrg Exp $ */
/*
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.37.14.1 2011/11/19 21:49:37 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: opl.c,v 1.37.14.2 2011/11/20 08:39:59 mrg Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -206,7 +206,7 @@ opl_command(struct opl_softc *sc, int of
DPRINTFN(4, ("opl_command: sc=%p, offs=%d addr=0x%02x data=0x%02x\n",
sc, offs, addr, data));
- KASSERT(mutex_owned(sc->lock));
+ KASSERT(!sc->lock || mutex_owned(sc->lock));
offs += sc->offs;
bus_space_write_1(sc->iot, sc->ioh, OPL_ADDR+offs, addr);