Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/acpi provide a lock for mpu_attach.
details: https://anonhg.NetBSD.org/src/rev/45cbabfd3cf2
branches: trunk
changeset: 771926:45cbabfd3cf2
user: mrg <mrg%NetBSD.org@localhost>
date: Fri Dec 09 08:56:54 2011 +0000
description:
provide a lock for mpu_attach.
diffstat:
sys/dev/acpi/mpu_acpi.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
diffs (35 lines):
diff -r 2ab7e094a97e -r 45cbabfd3cf2 sys/dev/acpi/mpu_acpi.c
--- a/sys/dev/acpi/mpu_acpi.c Fri Dec 09 06:50:36 2011 +0000
+++ b/sys/dev/acpi/mpu_acpi.c Fri Dec 09 08:56:54 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: mpu_acpi.c,v 1.12 2011/11/24 03:35:57 mrg Exp $ */
+/* $NetBSD: mpu_acpi.c,v 1.13 2011/12/09 08:56:54 mrg Exp $ */
/*
* Copyright (c) 2002 Jared D. McNeill <jmcneill%invisible.ca@localhost>
@@ -30,7 +30,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: mpu_acpi.c,v 1.12 2011/11/24 03:35:57 mrg Exp $");
+__KERNEL_RCSID(0, "$NetBSD: mpu_acpi.c,v 1.13 2011/12/09 08:56:54 mrg Exp $");
#include <sys/param.h>
#include <sys/device.h>
@@ -47,6 +47,7 @@
struct mpu_acpi_softc {
struct mpu_softc sc_mpu;
+ kmutex_t sc_lock;
};
CFATTACH_DECL_NEW(mpu_acpi, sizeof(struct mpu_acpi_softc), mpu_acpi_match,
@@ -118,6 +119,8 @@
sc->model = "Roland MPU-401 MIDI UART";
sc->sc_dev = self;
+ sc->lock = &asc->sc_lock;
+ mutex_init(&asc->sc_lock, MUTEX_DEFAULT, IPL_AUDIO);
mpu_attach(sc);
sc->arg = isa_intr_establish(aa->aa_ic, irq->ar_irq,
Home |
Main Index |
Thread Index |
Old Index