aboutsummaryrefslogtreecommitdiffstats
path: root/sound/arm/pxa2xx-ac97.c
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 10:36:05 -0500
committerJaroslav Kysela <perex@suse.cz>2006-03-22 04:25:43 -0500
commit12aa757905d09b1dc2c1c3d0de3fa8f4c9726f2b (patch)
treec776b2b66618915502cb8c552fe6fc720a18306d /sound/arm/pxa2xx-ac97.c
parent62932df8fb20ba2fb53a95fa52445eba22e821fe (diff)
[ALSA] semaphore -> mutex (Archs, misc buses)
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/arm/pxa2xx-ac97.c')
-rw-r--r--sound/arm/pxa2xx-ac97.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/sound/arm/pxa2xx-ac97.c b/sound/arm/pxa2xx-ac97.c
index 3acbc6023d19..599aff8290e8 100644
--- a/sound/arm/pxa2xx-ac97.c
+++ b/sound/arm/pxa2xx-ac97.c
@@ -25,7 +25,7 @@
25#include <sound/initval.h> 25#include <sound/initval.h>
26 26
27#include <asm/irq.h> 27#include <asm/irq.h>
28#include <asm/semaphore.h> 28#include <linux/mutex.h>
29#include <asm/hardware.h> 29#include <asm/hardware.h>
30#include <asm/arch/pxa-regs.h> 30#include <asm/arch/pxa-regs.h>
31#include <asm/arch/audio.h> 31#include <asm/arch/audio.h>
@@ -33,7 +33,7 @@
33#include "pxa2xx-pcm.h" 33#include "pxa2xx-pcm.h"
34 34
35 35
36static DECLARE_MUTEX(car_mutex); 36static DEFINE_MUTEX(car_mutex);
37static DECLARE_WAIT_QUEUE_HEAD(gsr_wq); 37static DECLARE_WAIT_QUEUE_HEAD(gsr_wq);
38static volatile long gsr_bits; 38static volatile long gsr_bits;
39 39
@@ -52,7 +52,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
52 unsigned short val = -1; 52 unsigned short val = -1;
53 volatile u32 *reg_addr; 53 volatile u32 *reg_addr;
54 54
55 down(&car_mutex); 55 mutex_lock(&car_mutex);
56 56
57 /* set up primary or secondary codec space */ 57 /* set up primary or secondary codec space */
58 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; 58 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE;
@@ -79,7 +79,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
79 /* but we've just started another cycle... */ 79 /* but we've just started another cycle... */
80 wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1); 80 wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1);
81 81
82out: up(&car_mutex); 82out: mutex_unlock(&car_mutex);
83 return val; 83 return val;
84} 84}
85 85
@@ -87,7 +87,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
87{ 87{
88 volatile u32 *reg_addr; 88 volatile u32 *reg_addr;
89 89
90 down(&car_mutex); 90 mutex_lock(&car_mutex);
91 91
92 /* set up primary or secondary codec space */ 92 /* set up primary or secondary codec space */
93 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE; 93 reg_addr = (ac97->num & 1) ? &SAC_REG_BASE : &PAC_REG_BASE;
@@ -101,7 +101,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
101 printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n", 101 printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n",
102 __FUNCTION__, reg, GSR | gsr_bits); 102 __FUNCTION__, reg, GSR | gsr_bits);
103 103
104 up(&car_mutex); 104 mutex_unlock(&car_mutex);
105} 105}
106 106
107static void pxa2xx_ac97_reset(struct snd_ac97 *ac97) 107static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)