diff options
Diffstat (limited to 'sound/pci/ac97/ac97_pcm.c')
-rw-r--r-- | sound/pci/ac97/ac97_pcm.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sound/pci/ac97/ac97_pcm.c b/sound/pci/ac97/ac97_pcm.c index c3e590bf7a02..512a3583b0ce 100644 --- a/sound/pci/ac97/ac97_pcm.c +++ b/sound/pci/ac97/ac97_pcm.c | |||
@@ -27,6 +27,8 @@ | |||
27 | #include <linux/delay.h> | 27 | #include <linux/delay.h> |
28 | #include <linux/init.h> | 28 | #include <linux/init.h> |
29 | #include <linux/slab.h> | 29 | #include <linux/slab.h> |
30 | #include <linux/mutex.h> | ||
31 | |||
30 | #include <sound/core.h> | 32 | #include <sound/core.h> |
31 | #include <sound/pcm.h> | 33 | #include <sound/pcm.h> |
32 | #include <sound/control.h> | 34 | #include <sound/control.h> |
@@ -206,7 +208,7 @@ static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) | |||
206 | mask = AC97_SC_SPSR_MASK; | 208 | mask = AC97_SC_SPSR_MASK; |
207 | } | 209 | } |
208 | 210 | ||
209 | down(&ac97->reg_mutex); | 211 | mutex_lock(&ac97->reg_mutex); |
210 | old = snd_ac97_read(ac97, reg) & mask; | 212 | old = snd_ac97_read(ac97, reg) & mask; |
211 | if (old != bits) { | 213 | if (old != bits) { |
212 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); | 214 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, 0); |
@@ -231,7 +233,7 @@ static int set_spdif_rate(struct snd_ac97 *ac97, unsigned short rate) | |||
231 | ac97->spdif_status = sbits; | 233 | ac97->spdif_status = sbits; |
232 | } | 234 | } |
233 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); | 235 | snd_ac97_update_bits_nolock(ac97, AC97_EXTENDED_STATUS, AC97_EA_SPDIF, AC97_EA_SPDIF); |
234 | up(&ac97->reg_mutex); | 236 | mutex_unlock(&ac97->reg_mutex); |
235 | return 0; | 237 | return 0; |
236 | } | 238 | } |
237 | 239 | ||