aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/atiixp_modem.c
diff options
context:
space:
mode:
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 8d8fd5a4ed35..1d3766044643 100644
--- a/sound/pci/atiixp_modem.c
+++ b/sound/pci/atiixp_modem.c
@@ -27,6 +27,7 @@
27#include <linux/pci.h> 27#include <linux/pci.h>
28#include <linux/slab.h> 28#include <linux/slab.h>
29#include <linux/moduleparam.h> 29#include <linux/moduleparam.h>
30#include <linux/mutex.h>
30#include <sound/core.h> 31#include <sound/core.h>
31#include <sound/pcm.h> 32#include <sound/pcm.h>
32#include <sound/pcm_params.h> 33#include <sound/pcm_params.h>
@@ -255,7 +256,7 @@ struct atiixp_modem {
255 unsigned int codec_not_ready_bits; /* for codec detection */ 256 unsigned int codec_not_ready_bits; /* for codec detection */
256 257
257 int spdif_over_aclink; /* passed from the module option */ 258 int spdif_over_aclink; /* passed from the module option */
258 struct semaphore open_mutex; /* playback open mutex */ 259 struct mutex open_mutex; /* playback open mutex */
259}; 260};
260 261
261 262
@@ -911,9 +912,9 @@ static int snd_atiixp_playback_open(struct snd_pcm_substream *substream)
911 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); 912 struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
912 int err; 913 int err;
913 914
914 down(&chip->open_mutex); 915 mutex_lock(&chip->open_mutex);
915 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0); 916 err = snd_atiixp_pcm_open(substream, &chip->dmas[ATI_DMA_PLAYBACK], 0);
916 up(&chip->open_mutex); 917 mutex_unlock(&chip->open_mutex);
917 if (err < 0) 918 if (err < 0)
918 return err; 919 return err;
919 return 0; 920 return 0;
@@ -923,9 +924,9 @@ static int snd_atiixp_playback_close(struct snd_pcm_substream *substream)
923{ 924{
924 struct atiixp_modem *chip = snd_pcm_substream_chip(substream); 925 struct atiixp_modem *chip = snd_pcm_substream_chip(substream);
925 int err; 926 int err;
926 down(&chip->open_mutex); 927 mutex_lock(&chip->open_mutex);
927 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]); 928 err = snd_atiixp_pcm_close(substream, &chip->dmas[ATI_DMA_PLAYBACK]);
928 up(&chip->open_mutex); 929 mutex_unlock(&chip->open_mutex);
929 return err; 930 return err;
930} 931}
931 932
@@ -1233,7 +1234,7 @@ static int __devinit snd_atiixp_create(struct snd_card *card,
1233 } 1234 }
1234 1235
1235 spin_lock_init(&chip->reg_lock); 1236 spin_lock_init(&chip->reg_lock);
1236 init_MUTEX(&chip->open_mutex); 1237 mutex_init(&chip->open_mutex);
1237 chip->card = card; 1238 chip->card = card;
1238 chip->pci = pci; 1239 chip->pci = pci;
1239 chip->irq = -1; 1240 chip->irq = -1;