diff options
| author | Uwe Kleine-König <u.kleine-koenig@pengutronix.de> | 2009-08-07 16:42:37 -0400 |
|---|---|---|
| committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2009-08-08 03:50:13 -0400 |
| commit | dbe9ea6e79d38cd5f2069405864ff06606cf9ff1 (patch) | |
| tree | bde6b753f0d6bd818ec82a2f35ea7f22467ec62e | |
| parent | b7b8f9bf0cd73b90561e8123fd5ec28f4539c419 (diff) | |
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>
| -rw-r--r-- | sound/soc/s3c24xx/s3c2443-ac97.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/sound/soc/s3c24xx/s3c2443-ac97.c b/sound/soc/s3c24xx/s3c2443-ac97.c index 3f03d5ddfacd..bf16f20fcbb3 100644 --- a/sound/soc/s3c24xx/s3c2443-ac97.c +++ b/sound/soc/s3c24xx/s3c2443-ac97.c | |||
| @@ -47,7 +47,7 @@ static struct s3c24xx_ac97_info s3c24xx_ac97; | |||
| 47 | 47 | ||
| 48 | static DECLARE_COMPLETION(ac97_completion); | 48 | static DECLARE_COMPLETION(ac97_completion); |
| 49 | static u32 codec_ready; | 49 | static u32 codec_ready; |
| 50 | static DECLARE_MUTEX(ac97_mutex); | 50 | static DEFINE_MUTEX(ac97_mutex); |
| 51 | 51 | ||
| 52 | static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97, | 52 | static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97, |
| 53 | unsigned short reg) | 53 | unsigned short reg) |
| @@ -56,7 +56,7 @@ static unsigned short s3c2443_ac97_read(struct snd_ac97 *ac97, | |||
| 56 | u32 ac_codec_cmd; | 56 | u32 ac_codec_cmd; |
| 57 | u32 stat, addr, data; | 57 | u32 stat, addr, data; |
| 58 | 58 | ||
| 59 | down(&ac97_mutex); | 59 | mutex_lock(&ac97_mutex); |
| 60 | 60 | ||
| 61 | codec_ready = S3C_AC97_GLBSTAT_CODECREADY; | 61 | codec_ready = S3C_AC97_GLBSTAT_CODECREADY; |
| 62 | ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD); | 62 | 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, | |||
| 79 | printk(KERN_ERR "s3c24xx-ac97: req addr = %02x," | 79 | printk(KERN_ERR "s3c24xx-ac97: req addr = %02x," |
| 80 | " rep addr = %02x\n", reg, addr); | 80 | " rep addr = %02x\n", reg, addr); |
| 81 | 81 | ||
| 82 | up(&ac97_mutex); | 82 | mutex_unlock(&ac97_mutex); |
| 83 | 83 | ||
| 84 | return (unsigned short)data; | 84 | return (unsigned short)data; |
| 85 | } | 85 | } |
| @@ -90,7 +90,7 @@ static void s3c2443_ac97_write(struct snd_ac97 *ac97, unsigned short reg, | |||
| 90 | u32 ac_glbctrl; | 90 | u32 ac_glbctrl; |
| 91 | u32 ac_codec_cmd; | 91 | u32 ac_codec_cmd; |
| 92 | 92 | ||
| 93 | down(&ac97_mutex); | 93 | mutex_lock(&ac97_mutex); |
| 94 | 94 | ||
| 95 | codec_ready = S3C_AC97_GLBSTAT_CODECREADY; | 95 | codec_ready = S3C_AC97_GLBSTAT_CODECREADY; |
| 96 | ac_codec_cmd = readl(s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD); | 96 | 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, | |||
| 109 | ac_codec_cmd |= S3C_AC97_CODEC_CMD_READ; | 109 | ac_codec_cmd |= S3C_AC97_CODEC_CMD_READ; |
| 110 | writel(ac_codec_cmd, s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD); | 110 | writel(ac_codec_cmd, s3c24xx_ac97.regs + S3C_AC97_CODEC_CMD); |
| 111 | 111 | ||
| 112 | up(&ac97_mutex); | 112 | mutex_unlock(&ac97_mutex); |
| 113 | 113 | ||
| 114 | } | 114 | } |
| 115 | 115 | ||
