forked from Minki/linux
ASoC: s3c2443-ac97: convert semaphore to mutex
This fixes a build failure for 2.6.31-rc4-rt1 (ARCH=arm, s3c2410_defconfig): CC [M] sound/soc/s3c24xx/s3c2443-ac97.o sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: type defaults to 'int' in declaration of 'DECLARE_MUTEX' sound/soc/s3c24xx/s3c2443-ac97.c:50: warning: parameter names (without types) in function declaration sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_read': sound/soc/s3c24xx/s3c2443-ac97.c:59: error: 'ac97_mutex' undeclared (first use in this function) sound/soc/s3c24xx/s3c2443-ac97.c:59: error: (Each undeclared identifier is reported only once sound/soc/s3c24xx/s3c2443-ac97.c:59: error: for each function it appears in.) sound/soc/s3c24xx/s3c2443-ac97.c: In function 's3c2443_ac97_write': sound/soc/s3c24xx/s3c2443-ac97.c:93: error: 'ac97_mutex' undeclared (first use in this function) Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
This commit is contained in:
parent
b7b8f9bf0c
commit
dbe9ea6e79
@ -47,7 +47,7 @@ static struct s3c24xx_ac97_info s3c24xx_ac97;
|
|||||||
|
|
||||||
static DECLARE_COMPLETION(ac97_completion);
|
static DECLARE_COMPLETION(ac97_completion);
|
||||||
static u32 codec_ready;
|
static u32 codec_ready;
|
||||||
static DECLARE_MUTEX(ac97_mutex);
|
static DEFINE_MUTEX(ac97_mutex);
|
||||||
|
|
||||||
static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
|
static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
|
||||||
unsigned short reg)
|
unsigned short reg)
|
||||||
@ -56,7 +56,7 @@ static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
|
|||||||
u32 ac_codec_cmd;
|
u32 ac_codec_cmd;
|
||||||
u32 stat, addr, data;
|
u32 stat, addr, data;
|
||||||
|
|
||||||
down(&ac97_mutex);
|
mutex_lock(&ac97_mutex);
|
||||||
|
|
||||||
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
|
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
|
||||||
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
||||||
@ -79,7 +79,7 @@ static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97,
|
|||||||
printk(KERN_ERR "s3c24xx-ac97: req addr = %02x,"
|
printk(KERN_ERR "s3c24xx-ac97: req addr = %02x,"
|
||||||
" rep addr = %02x\n", reg, addr);
|
" rep addr = %02x\n", reg, addr);
|
||||||
|
|
||||||
up(&ac97_mutex);
|
mutex_unlock(&ac97_mutex);
|
||||||
|
|
||||||
return (unsigned short)data;
|
return (unsigned short)data;
|
||||||
}
|
}
|
||||||
@ -90,7 +90,7 @@ static void s3c2443_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
|
|||||||
u32 ac_glbctrl;
|
u32 ac_glbctrl;
|
||||||
u32 ac_codec_cmd;
|
u32 ac_codec_cmd;
|
||||||
|
|
||||||
down(&ac97_mutex);
|
mutex_lock(&ac97_mutex);
|
||||||
|
|
||||||
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
|
codec_ready = S3C_AC97_GLBSTAT_CODECREADY;
|
||||||
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
||||||
@ -109,7 +109,7 @@ static void s3c2443_ac97_write(struct snd_ac97 *ac97, unsigned short reg,
|
|||||||
ac_codec_cmd |= S3C_AC97_CODEC_CMD_READ;
|
ac_codec_cmd |= S3C_AC97_CODEC_CMD_READ;
|
||||||
writel(ac_codec_cmd, s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
writel(ac_codec_cmd, s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD);
|
||||||
|
|
||||||
up(&ac97_mutex);
|
mutex_unlock(&ac97_mutex);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user