svn commit: r195120 - head/sys/dev/sound/usb
Andrew Thompson
thompsa at FreeBSD.org
Sat Jun 27 21:21:12 UTC 2009
Author: thompsa
Date: Sat Jun 27 21:21:11 2009
New Revision: 195120
URL: http://svn.freebsd.org/changeset/base/195120
Log:
Use the correct mutex in umidi_open()
Submitted by: Hans Petter Selasky
Approved by: re (kib)
Modified:
head/sys/dev/sound/usb/uaudio.c
Modified: head/sys/dev/sound/usb/uaudio.c
==============================================================================
--- head/sys/dev/sound/usb/uaudio.c Sat Jun 27 21:19:09 2009 (r195119)
+++ head/sys/dev/sound/usb/uaudio.c Sat Jun 27 21:21:11 2009 (r195120)
@@ -3671,24 +3671,24 @@ umidi_open(struct usb_fifo *fifo, int ff
if (usb_fifo_alloc_buffer(fifo, 4, (1024 / 4))) {
return (ENOMEM);
}
- mtx_lock(&Giant);
+ mtx_lock(&chan->mtx);
chan->read_open_refcount++;
sub->read_open = 1;
- mtx_unlock(&Giant);
+ mtx_unlock(&chan->mtx);
}
if (fflags & FWRITE) {
if (usb_fifo_alloc_buffer(fifo, 32, (1024 / 32))) {
return (ENOMEM);
}
/* clear stall first */
- mtx_lock(&Giant);
+ mtx_lock(&chan->mtx);
chan->flags |= UMIDI_FLAG_WRITE_STALL;
chan->write_open_refcount++;
sub->write_open = 1;
/* reset */
sub->state = UMIDI_ST_UNKNOWN;
- mtx_unlock(&Giant);
+ mtx_unlock(&chan->mtx);
}
return (0); /* success */
}
More information about the svn-src-all
mailing list