summaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorStephen Rothwell <sfr@canb.auug.org.au>2008-06-13 16:34:53 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-06-13 16:34:53 +1000
commitc3d9eb43992ad23c2b04b1d179cf93ba0e69f086 (patch)
treecf90f37fe318ded39bca227fb903a362007aba33 /sound
parentb1644c2cf251e1a51b1f42b81a24891660f44690 (diff)
parente05c6daff0066a22c4f5dd2e7e3223288c9011bb (diff)
Merge commit 'semaphore-removal/semaphore-removal'
Conflicts: drivers/net/ps3_gelic_wireless.c drivers/scsi/qla2xxx/qla_attr.c drivers/scsi/qla2xxx/qla_def.h drivers/scsi/qla2xxx/qla_mbx.c drivers/scsi/qla2xxx/qla_mid.c drivers/scsi/qla2xxx/qla_os.c
Diffstat (limited to 'sound')
-rw-r--r--sound/soc/s3c24xx/s3c2443-ac97.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c
index 533565b61b2f..b219215ad121 100644
--- a/sound/soc/s3c24xx/s3c2443-ac97.c
+++ b/sound/soc/s3c24xx/s3c2443-ac97.c
@@ -20,6 +20,7 @@
#include <linux/wait.h>
#include <linux/delay.h>
#include <linux/clk.h>
+#include <linux/mutex.h>
#include <sound/core.h>
#include <sound/pcm.h>
@@ -46,7 +47,7 @@ static struct s3c24xx_ac97_info s3c24xx_ac97;
static DECLARE_COMPLETION(ac97_completion);
static u32 codec_ready;
-static DECLARE_MUTEX(ac97_mutex);
+static DEFINE_MUTEX(ac97_mutex);
static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
unsigned short reg)
@@ -55,7 +56,7 @@ static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
u32 ac_codec_cmd;
u32 stat, addr, data;
- down(&ac97_mutex);
+ mutex_lock(&ac97_mutex);
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
@@ -78,7 +79,7 @@ static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
printk(KERN_ERR "s3c24xx-ac97: req addr = %02x,"
" rep addr = %02x\n", reg, addr);
- up(&ac97_mutex);
+ mutex_unlock(&ac97_mutex);
return (unsigned short)data;
}
@@ -89,7 +90,7 @@ static void s3c2443_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
u32 ac_glbctrl;
u32 ac_codec_cmd;
- down(&ac97_mutex);
+ mutex_lock(&ac97_mutex);
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
@@ -108,7 +109,7 @@ static void s3c2443_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
ac_codec_cmd |= S3C_AC97_CODEC_CMD_READ;
writel(ac_codec_cmd, s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
- up(&ac97_mutex);
+ mutex_unlock(&ac97_mutex);
}