summaryrefslogtreecommitdiff
path: root/sound/pci/atiixp_modem.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 15:34:20 (GMT)
committerJaroslav Kysela <perex@suse.cz>2006-03-22 09:25:29 (GMT)
commit62932df8fb20ba2fb53a95fa52445eba22e821fe (patch)
tree335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/atiixp_modem.c
parent8b7547f95cbe8a5940df62ed730646fdfcba5fda (diff)
downloadlinux-62932df8fb20ba2fb53a95fa52445eba22e821fe.tar.xz
[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/atiixp_modem.c')
-rw-r--r--sound/pci/atiixp_modem.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/sound/pci/atiixp_modem.c b/sound/pci/atiixp_modem.c
index 8d8fd5a..1d37660 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -27,6 +27,7 @@
#include <linux/pci.h>
#include <linux/slab.h>
#include <linux/moduleparam.h>
+#include <linux/mutex.h>
#include <sound/core.h>
#include <sound/pcm.h>
#include <sound/pcm_params.h>
@@ -255,7 +256,7 @@ struct atiixp_modem {
unsigned int codec_not_ready_bits; /* for codec detection */
int spdif_over_aclink; /* passed from the module option */
- struct semaphore open_mutex; /* playback open mutex */
+ struct mutex open_mutex; /* playback open mutex */
};
@@ -911,9 +912,9 @@ static int snd_atiixp_playback_open(struct snd_pcm_substream *substream)
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
int err;
- down(&chip->open_mutex);
+ mutex_lock(&chip->open_mutex);
err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0);
- up(&chip->open_mutex);
+ mutex_unlock(&chip->open_mutex);
if (err < 0)
return err;
return 0;
@@ -923,9 +924,9 @@ static int snd_atiixp_playback_close(struct snd_pcm_substream *substream)
{
struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
int err;
- down(&chip->open_mutex);
+ mutex_lock(&chip->open_mutex);
err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]);
- up(&chip->open_mutex);
+ mutex_unlock(&chip->open_mutex);
return err;
}
@@ -1233,7 +1234,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
}
spin_lock_init(&chip->reg_lock);
- init_MUTEX(&chip->open_mutex);
+ mutex_init(&chip->open_mutex);
chip->card = card;
chip->pci = pci;
chip->irq = -1;