diff options
author | Ingo Molnar <mingo@elte.hu> | 2006-01-16 10:34:20 -0500 |
---|---|---|
committer | Jaroslav Kysela <perex@suse.cz> | 2006-03-22 04:25:29 -0500 |
commit | 62932df8fb20ba2fb53a95fa52445eba22e821fe (patch) | |
tree | 335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/mixart/mixart.c | |
parent | 8b7547f95cbe8a5940df62ed730646fdfcba5fda (diff) |
[ALSA] semaphore -> mutex (PCI part)
Semaphore to mutex conversion.
The conversion was generated via scripts, and the result was validated
automatically via a script as well.
Signed-off-by: Ingo Molnar <mingo@elte.hu>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/pci/mixart/mixart.c')
-rw-r--r-- | sound/pci/mixart/mixart.c | 21 |
1 files changed, 11 insertions, 10 deletions
diff --git a/sound/pci/mixart/mixart.c b/sound/pci/mixart/mixart.c index b218e1d20c78..e79fb264532b 100644 --- a/sound/pci/mixart/mixart.c +++ b/sound/pci/mixart/mixart.c | |||
@@ -26,6 +26,7 @@ | |||
26 | #include <linux/interrupt.h> | 26 | #include <linux/interrupt.h> |
27 | #include <linux/pci.h> | 27 | #include <linux/pci.h> |
28 | #include <linux/moduleparam.h> | 28 | #include <linux/moduleparam.h> |
29 | #include <linux/mutex.h> | ||
29 | #include <sound/core.h> | 30 | #include <sound/core.h> |
30 | #include <sound/initval.h> | 31 | #include <sound/initval.h> |
31 | #include <sound/info.h> | 32 | #include <sound/info.h> |
@@ -589,7 +590,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, | |||
589 | /* set up format for the stream */ | 590 | /* set up format for the stream */ |
590 | format = params_format(hw); | 591 | format = params_format(hw); |
591 | 592 | ||
592 | down(&mgr->setup_mutex); | 593 | mutex_lock(&mgr->setup_mutex); |
593 | 594 | ||
594 | /* update the stream levels */ | 595 | /* update the stream levels */ |
595 | if( stream->pcm_number <= MIXART_PCM_DIGITAL ) { | 596 | if( stream->pcm_number <= MIXART_PCM_DIGITAL ) { |
@@ -628,7 +629,7 @@ static int snd_mixart_hw_params(struct snd_pcm_substream *subs, | |||
628 | bufferinfo[i].available_length, | 629 | bufferinfo[i].available_length, |
629 | subs->number); | 630 | subs->number); |
630 | } | 631 | } |
631 | up(&mgr->setup_mutex); | 632 | mutex_unlock(&mgr->setup_mutex); |
632 | 633 | ||
633 | return err; | 634 | return err; |
634 | } | 635 | } |
@@ -700,7 +701,7 @@ static int snd_mixart_playback_open(struct snd_pcm_substream *subs) | |||
700 | int err = 0; | 701 | int err = 0; |
701 | int pcm_number; | 702 | int pcm_number; |
702 | 703 | ||
703 | down(&mgr->setup_mutex); | 704 | mutex_lock(&mgr->setup_mutex); |
704 | 705 | ||
705 | if ( pcm == chip->pcm ) { | 706 | if ( pcm == chip->pcm ) { |
706 | pcm_number = MIXART_PCM_ANALOG; | 707 | pcm_number = MIXART_PCM_ANALOG; |
@@ -758,7 +759,7 @@ static int snd_mixart_playback_open(struct snd_pcm_substream *subs) | |||
758 | } | 759 | } |
759 | 760 | ||
760 | _exit_open: | 761 | _exit_open: |
761 | up(&mgr->setup_mutex); | 762 | mutex_unlock(&mgr->setup_mutex); |
762 | 763 | ||
763 | return err; | 764 | return err; |
764 | } | 765 | } |
@@ -775,7 +776,7 @@ static int snd_mixart_capture_open(struct snd_pcm_substream *subs) | |||
775 | int err = 0; | 776 | int err = 0; |
776 | int pcm_number; | 777 | int pcm_number; |
777 | 778 | ||
778 | down(&mgr->setup_mutex); | 779 | mutex_lock(&mgr->setup_mutex); |
779 | 780 | ||
780 | if ( pcm == chip->pcm ) { | 781 | if ( pcm == chip->pcm ) { |
781 | pcm_number = MIXART_PCM_ANALOG; | 782 | pcm_number = MIXART_PCM_ANALOG; |
@@ -836,7 +837,7 @@ static int snd_mixart_capture_open(struct snd_pcm_substream *subs) | |||
836 | } | 837 | } |
837 | 838 | ||
838 | _exit_open: | 839 | _exit_open: |
839 | up(&mgr->setup_mutex); | 840 | mutex_unlock(&mgr->setup_mutex); |
840 | 841 | ||
841 | return err; | 842 | return err; |
842 | } | 843 | } |
@@ -849,7 +850,7 @@ static int snd_mixart_close(struct snd_pcm_substream *subs) | |||
849 | struct mixart_mgr *mgr = chip->mgr; | 850 | struct mixart_mgr *mgr = chip->mgr; |
850 | struct mixart_stream *stream = subs->runtime->private_data; | 851 | struct mixart_stream *stream = subs->runtime->private_data; |
851 | 852 | ||
852 | down(&mgr->setup_mutex); | 853 | mutex_lock(&mgr->setup_mutex); |
853 | 854 | ||
854 | snd_printdd("snd_mixart_close C%d/P%d/Sub%d\n", chip->chip_idx, stream->pcm_number, subs->number); | 855 | snd_printdd("snd_mixart_close C%d/P%d/Sub%d\n", chip->chip_idx, stream->pcm_number, subs->number); |
855 | 856 | ||
@@ -868,7 +869,7 @@ static int snd_mixart_close(struct snd_pcm_substream *subs) | |||
868 | stream->status = MIXART_STREAM_STATUS_FREE; | 869 | stream->status = MIXART_STREAM_STATUS_FREE; |
869 | stream->substream = NULL; | 870 | stream->substream = NULL; |
870 | 871 | ||
871 | up(&mgr->setup_mutex); | 872 | mutex_unlock(&mgr->setup_mutex); |
872 | return 0; | 873 | return 0; |
873 | } | 874 | } |
874 | 875 | ||
@@ -1335,12 +1336,12 @@ static int __devinit snd_mixart_probe(struct pci_dev *pci, | |||
1335 | mgr->msg_fifo_writeptr = 0; | 1336 | mgr->msg_fifo_writeptr = 0; |
1336 | 1337 | ||
1337 | spin_lock_init(&mgr->msg_lock); | 1338 | spin_lock_init(&mgr->msg_lock); |
1338 | init_MUTEX(&mgr->msg_mutex); | 1339 | mutex_init(&mgr->msg_mutex); |
1339 | init_waitqueue_head(&mgr->msg_sleep); | 1340 | init_waitqueue_head(&mgr->msg_sleep); |
1340 | atomic_set(&mgr->msg_processed, 0); | 1341 | atomic_set(&mgr->msg_processed, 0); |
1341 | 1342 | ||
1342 | /* init setup mutex*/ | 1343 | /* init setup mutex*/ |
1343 | init_MUTEX(&mgr->setup_mutex); | 1344 | mutex_init(&mgr->setup_mutex); |
1344 | 1345 | ||
1345 | /* init message taslket */ | 1346 | /* init message taslket */ |
1346 | tasklet_init(&mgr->msg_taskq, snd_mixart_msg_tasklet, (unsigned long) mgr); | 1347 | tasklet_init(&mgr->msg_taskq, snd_mixart_msg_tasklet, (unsigned long) mgr); |