Date: Sat, 27 Jun 2009 21:21:11 +0000 (UTC) From: Andrew Thompson <thompsa@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r195120 - head/sys/dev/sound/usb Message-ID: <200906272121.n5RLLBAq088610@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
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 */ }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200906272121.n5RLLBAq088610>