summaryrefslogtreecommitdiff
path: root/sound/arm
diff options
context:
space:
mode:
authorIngo Molnar <mingo@elte.hu>2006-01-16 16:36:05 +0100
committerJaroslav Kysela <perex@suse.cz>2006-03-22 10:25:43 +0100
commit12aa757905d09b1dc2c1c3d0de3fa8f4c9726f2b (patch)
treec776b2b66618915502cb8c552fe6fc720a18306d /sound/arm
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')
-rw-r--r--sound/arm/aaci.c10
-rw-r--r--sound/arm/aaci.h2
-rw-r--r--sound/arm/pxa2xx-ac97.c12
3 files changed, 12 insertions, 12 deletions
diff --git a/sound/arm/aaci.c b/sound/arm/aaci.c
index 149feb410654..5f22d70fefc0 100644
--- a/sound/arm/aaci.c
+++ b/sound/arm/aaci.c
@@ -73,7 +73,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned
if (ac97->num >= 4)
return;
- down(&aaci->ac97_sem);
+ mutex_lock(&aaci->ac97_sem);
aaci_ac97_select_codec(aaci, ac97);
@@ -91,7 +91,7 @@ static void aaci_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigned
v = readl(aaci->base + AACI_SLFR);
} while (v & (SLFR_1TXB|SLFR_2TXB));
- up(&aaci->ac97_sem);
+ mutex_unlock(&aaci->ac97_sem);
}
/*
@@ -105,7 +105,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
if (ac97->num >= 4)
return ~0;
- down(&aaci->ac97_sem);
+ mutex_lock(&aaci->ac97_sem);
aaci_ac97_select_codec(aaci, ac97);
@@ -145,7 +145,7 @@ static unsigned short aaci_ac97_read(struct snd_ac97 *ac97, unsigned short reg)
v = ~0;
}
- up(&aaci->ac97_sem);
+ mutex_unlock(&aaci->ac97_sem);
return v;
}
@@ -783,7 +783,7 @@ static struct aaci * __devinit aaci_init_card(struct amba_device *dev)
card->shortname, dev->res.start, dev->irq[0]);
aaci = card->private_data;
- init_MUTEX(&aaci->ac97_sem);
+ mutex_init(&aaci->ac97_sem);
spin_lock_init(&aaci->lock);
aaci->card = card;
aaci->dev = dev;
diff --git a/sound/arm/aaci.h b/sound/arm/aaci.h
index 83f73c2505c6..06295190606c 100644
--- a/sound/arm/aaci.h
+++ b/sound/arm/aaci.h
@@ -227,7 +227,7 @@ struct aaci {
unsigned int fifosize;
/* AC'97 */
- struct semaphore ac97_sem;
+ struct mutex ac97_sem;
ac97_bus_t *ac97_bus;
u32 maincr;
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 @@
#include <sound/initval.h>
#include <asm/irq.h>
-#include <asm/semaphore.h>
+#include <linux/mutex.h>
#include <asm/hardware.h>
#include <asm/arch/pxa-regs.h>
#include <asm/arch/audio.h>
@@ -33,7 +33,7 @@
#include "pxa2xx-pcm.h"
-static DECLARE_MUTEX(car_mutex);
+static DEFINE_MUTEX(car_mutex);
static DECLARE_WAIT_QUEUE_HEAD(gsr_wq);
static volatile long gsr_bits;
@@ -52,7 +52,7 @@ static unsigned short pxa2xx_ac97_read(struct snd_ac97 *ac97, unsigned short reg
unsigned short val = -1;
volatile u32 *reg_addr;
- down(&car_mutex);
+ mutex_lock(&car_mutex);
/* set up primary or secondary codec space */
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
/* but we've just started another cycle... */
wait_event_timeout(gsr_wq, (GSR | gsr_bits) & GSR_SDONE, 1);
-out: up(&car_mutex);
+out: mutex_unlock(&car_mutex);
return val;
}
@@ -87,7 +87,7 @@ static void pxa2xx_ac97_write(struct snd_ac97 *ac97, unsigned short reg, unsigne
{
volatile u32 *reg_addr;
- down(&car_mutex);
+ mutex_lock(&car_mutex);
/* set up primary or secondary codec space */
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
printk(KERN_ERR "%s: write error (ac97_reg=%d GSR=%#lx)\n",
__FUNCTION__, reg, GSR | gsr_bits);
- up(&car_mutex);
+ mutex_unlock(&car_mutex);
}
static void pxa2xx_ac97_reset(struct snd_ac97 *ac97)