Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ic src/sys/dev/ic/mpu.c
details: https://anonhg.NetBSD.org/src/rev/aee7eeca9a03
branches: trunk
changeset: 772914:aee7eeca9a03
user: chs <chs%NetBSD.org@localhost>
date: Sat Jan 21 16:49:26 2012 +0000
description:
src/sys/dev/ic/mpu.c
fix assertions after audiomp.
diffstat:
sys/dev/ic/mpu.c | 12 ++++++------
1 files changed, 6 insertions(+), 6 deletions(-)
diffs (47 lines):
diff -r cf1b9b67edfc -r aee7eeca9a03 sys/dev/ic/mpu.c
--- a/sys/dev/ic/mpu.c Sat Jan 21 16:48:56 2012 +0000
+++ b/sys/dev/ic/mpu.c Sat Jan 21 16:49:26 2012 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpu.c,v 1.18 2011/11/23 23:07:32 jmcneill Exp $ */
+/* $NetBSD: mpu.c,v 1.19 2012/01/21 16:49:26 chs Exp $ */
/*
* Copyright (c) 1998, 2008 The NetBSD Foundation, Inc.
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpu.c,v 1.18 2011/11/23 23:07:32 jmcneill Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpu.c,v 1.19 2012/01/21 16:49:26 chs Exp $");
#include <sys/param.h>
#include <sys/systm.h>
@@ -123,9 +123,9 @@
{
int i;
- KASSERT(mutex_owned(sc->lock));
+ KASSERT(sc->lock == NULL || mutex_owned(sc->lock));
- for(i = 0; i < MPU_MAXWAIT; i++) {
+ for (i = 0; i < MPU_MAXWAIT; i++) {
if (!(MPU_GETSTATUS(sc->iot, sc->ioh) & MPU_OUTPUT_BUSY))
return 0;
delay(10);
@@ -140,14 +140,14 @@
bus_space_handle_t ioh = sc->ioh;
int i;
- KASSERT(mutex_owned(sc->lock));
+ KASSERT(sc->lock == NULL || mutex_owned(sc->lock));
if (mpu_waitready(sc)) {
DPRINTF(("%s: not ready\n", __func__));
return EIO;
}
bus_space_write_1(iot, ioh, MPU_COMMAND, MPU_RESET);
- for(i = 0; i < 2*MPU_MAXWAIT; i++) {
+ for (i = 0; i < 2*MPU_MAXWAIT; i++) {
if (!(MPU_GETSTATUS(iot, ioh) & MPU_INPUT_EMPTY) &&
bus_space_read_1(iot, ioh, MPU_DATA) == MPU_ACK) {
return 0;
Home |
Main Index |
Thread Index |
Old Index