aboutsummaryrefslogtreecommitdiffstats
path: root/sound/pci/ac97/ac97_proc.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:34:20 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:29 -0500
commit62932df8fb20ba2fb53a95fa52445eba22e821fe (patch)
tree335178d7438395a68a453a9c23624b3e9fc5ec40 /sound/pci/ac97/ac97_proc.c
parent8b7547f95cbe8a5940df62ed730646fdfcba5fda (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/ac97/ac97_proc.c')
-rw-r--r--sound/pci/ac97/ac97_proc.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/sound/pci/ac97/ac97_proc.c b/sound/pci/ac97/ac97_proc.c
index 7134b3f55fb5..4d523df79cc7 100644
--- a/sound/pci/ac97/ac97_proc.c
+++ b/sound/pci/ac97/ac97_proc.c
@@ -24,6 +24,8 @@
24 24
25#include <sound/driver.h> 25#include <sound/driver.h>
26#include <linux/slab.h> 26#include <linux/slab.h>
27#include <linux/mutex.h>
28
27#include <sound/core.h> 29#include <sound/core.h>
28#include <sound/ac97_codec.h> 30#include <sound/ac97_codec.h>
29#include <sound/asoundef.h> 31#include <sound/asoundef.h>
@@ -338,7 +340,7 @@ static void snd_ac97_proc_read(struct snd_info_entry *entry, struct snd_info_buf
338{ 340{
339 struct snd_ac97 *ac97 = entry->private_data; 341 struct snd_ac97 *ac97 = entry->private_data;
340 342
341 down(&ac97->page_mutex); 343 mutex_lock(&ac97->page_mutex);
342 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 344 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86
343 int idx; 345 int idx;
344 for (idx = 0; idx < 3; idx++) 346 for (idx = 0; idx < 3; idx++)
@@ -364,7 +366,7 @@ static void snd_ac97_proc_read(struct snd_info_entry *entry, struct snd_info_buf
364 } else { 366 } else {
365 snd_ac97_proc_read_main(ac97, buffer, 0); 367 snd_ac97_proc_read_main(ac97, buffer, 0);
366 } 368 }
367 up(&ac97->page_mutex); 369 mutex_unlock(&ac97->page_mutex);
368} 370}
369 371
370#ifdef CONFIG_SND_DEBUG 372#ifdef CONFIG_SND_DEBUG
@@ -374,7 +376,7 @@ static void snd_ac97_proc_regs_write(struct snd_info_entry *entry, struct snd_in
374 struct snd_ac97 *ac97 = entry->private_data; 376 struct snd_ac97 *ac97 = entry->private_data;
375 char line[64]; 377 char line[64];
376 unsigned int reg, val; 378 unsigned int reg, val;
377 down(&ac97->page_mutex); 379 mutex_lock(&ac97->page_mutex);
378 while (!snd_info_get_line(buffer, line, sizeof(line))) { 380 while (!snd_info_get_line(buffer, line, sizeof(line))) {
379 if (sscanf(line, "%x %x", &reg, &val) != 2) 381 if (sscanf(line, "%x %x", &reg, &val) != 2)
380 continue; 382 continue;
@@ -382,7 +384,7 @@ static void snd_ac97_proc_regs_write(struct snd_info_entry *entry, struct snd_in
382 if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff) 384 if (reg < 0x80 && (reg & 1) == 0 && val <= 0xffff)
383 snd_ac97_write_cache(ac97, reg, val); 385 snd_ac97_write_cache(ac97, reg, val);
384 } 386 }
385 up(&ac97->page_mutex); 387 mutex_unlock(&ac97->page_mutex);
386} 388}
387#endif 389#endif
388 390
@@ -401,7 +403,7 @@ static void snd_ac97_proc_regs_read(struct snd_info_entry *entry,
401{ 403{
402 struct snd_ac97 *ac97 = entry->private_data; 404 struct snd_ac97 *ac97 = entry->private_data;
403 405
404 down(&ac97->page_mutex); 406 mutex_lock(&ac97->page_mutex);
405 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86 407 if ((ac97->id & 0xffffff40) == AC97_ID_AD1881) { // Analog Devices AD1881/85/86
406 408
407 int idx; 409 int idx;
@@ -417,7 +419,7 @@ static void snd_ac97_proc_regs_read(struct snd_info_entry *entry,
417 } else { 419 } else {
418 snd_ac97_proc_regs_read_main(ac97, buffer, 0); 420 snd_ac97_proc_regs_read_main(ac97, buffer, 0);
419 } 421 }
420 up(&ac97->page_mutex); 422 mutex_unlock(&ac97->page_mutex);
421} 423}
422 424
423void snd_ac97_proc_init(struct snd_ac97 * ac97) 425void snd_ac97_proc_init(struct snd_ac97 * ac97)