aboutsummaryrefslogtreecommitdiff
path: root/sound/pci/mixart/mixart.c
diff options
context:
space:
mode:
Diffstat (limited to 'sound/pci/mixart/mixart.c')
-rw-r--r--sound/pci/mixart/mixart.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c
index b218e1d20c7..e79fb264532 100644
--- a/sound/pci/mixart/mixart.c
+++ b/sound/pci/mixart/mixart.c
@@ -26,6 +26,7 @@
#include <linux/interrupt.h>
#include <linux/pci.h>
#include <linux/moduleparam.h>
+#include <linux/mutex.h>
#include <sound/core.h>
#include <sound/initval.h>
#include <sound/info.h>
@@ -589,7 +590,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs,
/* set up format for the stream */
format = params_format(hw);
- down(&mgr->setup_mutex);
+ mutex_lock(&mgr->setup_mutex);
/* update the stream levels */
if( stream->pcm_number <= MIXART_PCM_DIGITAL ) {
@@ -628,7 +629,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs,
bufferinfo[i].available_length,
subs->number);
}
- up(&mgr->setup_mutex);
+ mutex_unlock(&mgr->setup_mutex);
return err;
}
@@ -700,7 +701,7 @@ static int snd_mixart_playback_open(struct snd_pcm_substream *subs)
int err = 0;
int pcm_number;
- down(&mgr->setup_mutex);
+ mutex_lock(&mgr->setup_mutex);
if ( pcm == chip->pcm ) {
pcm_number = MIXART_PCM_ANALOG;
@@ -758,7 +759,7 @@ static int snd_mixart_playback_open(struct snd_pcm_substream *subs)
}
_exit_open:
- up(&mgr->setup_mutex);
+ mutex_unlock(&mgr->setup_mutex);
return err;
}
@@ -775,7 +776,7 @@ static int snd_mixart_capture_open(struct snd_pcm_substream *subs)
int err = 0;
int pcm_number;
- down(&mgr->setup_mutex);
+ mutex_lock(&mgr->setup_mutex);
if ( pcm == chip->pcm ) {
pcm_number = MIXART_PCM_ANALOG;
@@ -836,7 +837,7 @@ static int snd_mixart_capture_open(struct snd_pcm_substream *subs)
}
_exit_open:
- up(&mgr->setup_mutex);
+ mutex_unlock(&mgr->setup_mutex);
return err;
}
@@ -849,7 +850,7 @@ static int snd_mixart_close(struct snd_pcm_substream *subs)
struct mixart_mgr *mgr = chip->mgr;
struct mixart_stream *stream = subs->runtime->private_data;
- down(&mgr->setup_mutex);
+ mutex_lock(&mgr->setup_mutex);
snd_printdd("snd_mixart_close C%d/P%d/Sub%d\n", chip->chip_idx, stream->pcm_number, subs->number);
@@ -868,7 +869,7 @@ static int snd_mixart_close(struct snd_pcm_substream *subs)
stream->status = MIXART_STREAM_STATUS_FREE;
stream->substream = NULL;
- up(&mgr->setup_mutex);
+ mutex_unlock(&mgr->setup_mutex);
return 0;
}
@@ -1335,12 +1336,12 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci,
mgr->msg_fifo_writeptr = 0;
spin_lock_init(&mgr->msg_lock);
- init_MUTEX(&mgr->msg_mutex);
+ mutex_init(&mgr->msg_mutex);
init_waitqueue_head(&mgr->msg_sleep);
atomic_set(&mgr->msg_processed, 0);
/* init setup mutex*/
- init_MUTEX(&mgr->setup_mutex);
+ mutex_init(&mgr->setup_mutex);
/* init message taslket */
tasklet_init(&mgr->msg_taskq, snd_mixart_msg_tasklet, (unsigned long) mgr);