Skip to contentSkip to conversation

ASoC: bf5xx-ac97: Fix compile error

PATCH Applied Lars-Peter Clausen 2 participants 6 messages Jul 30, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/2 ASoC: bf5xx-ac97: Fix compile error

If CONFIG_SND_BF5XX_HAVE_COLD_RESET is enabled building the blackfin ac97 driver fails with the following compile error:
sound/soc/blackfin/bf5xx-ac97.c: In function ‘asoc_bfin_ac97_probe’:
sound/soc/blackfin/bf5xx-ac97.c:297: error: expected ‘;’ before ‘{’ token sound/soc/blackfin/bf5xx-ac97.c:302: error: label ‘gpio_err’ used but not defined

The issue was introduced in commit 6dab2fd7 ("ASoC: bf5xx-ac97: Convert to devm_gpio_request_one()").

---
 sound/soc/blackfin/bf5xx-ac97.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
sound/soc/blackfin/bf5xx-ac97.c +3 -2
index efb1dae..e82eb37 100644
@@ -294,11 +294,12 @@ static int asoc_bfin_ac97_probe(struct platform_device *pdev)
 	/* Request PB3 as reset pin */
 	ret = devm_gpio_request_one(&pdev->dev,
 				    CONFIG_SND_BF5XX_RESET_GPIO_NUM,
-				    GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET") {
+				    GPIOF_OUT_INIT_HIGH, "SND_AD198x RESET");
+	if (ret) {
 		dev_err(&pdev->dev,
 			"Failed to request GPIO_%d for reset: %d\n",
 			CONFIG_SND_BF5XX_RESET_GPIO_NUM, ret);
-		goto gpio_err;
+		return ret;
 	}
 #endif
 
Signature · 6 lines
1.8.0

_______________________________________________
Alsa-devel mailing list
[email protected]
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel
#1 lore raw

PATCH 2/2 ASoC: bf5xx-ac97: Remove unused extern declaration

The blackfin ac97 driver never defines nor uses a global ac97 struct. So remove the extern declaration for it.

---
 sound/soc/blackfin/bf5xx-ac97.h | 1 -
 1 file changed, 1 deletion(-)
sound/soc/blackfin/bf5xx-ac97.h +0 -1
index 0c3e22d..a680fdc 100644
@@ -9,7 +9,6 @@
 #ifndef _BF5XX_AC97_H
 #define _BF5XX_AC97_H
 
-extern struct snd_ac97 *ac97;
 /* Frame format in memory, only support stereo currently */
 struct ac97_frame {
 	u16 ac97_tag;		/* slot 0 */
Signature · 1 line
1.8.0
maintainer
#2 lore raw

Re: [PATCH 2/2] ASoC: bf5xx-ac97: Remove unused extern declaration

Quoted 2 lines · Lars-Peter Clausen

The blackfin ac97 driver never defines nor uses a global ac97 struct. So remove the extern declaration for it.

This is a duplicate of my patch from yesterday...

#3 lore raw

Re: [PATCH 2/2] ASoC: bf5xx-ac97: Remove unused extern declaration

Quoted 6 lines · Mark Brown
Quoted 2 lines · Lars-Peter Clausen

The blackfin ac97 driver never defines nor uses a global ac97 struct. So remove the extern declaration for it.

This is a duplicate of my patch from yesterday...

No, this is a different one. Your patch removed the extern declaration for bf5xx_ac97_ops this one removes it for ac97, which was on the next line.

- Lars

maintainer
#4 lore raw

Re: [PATCH 2/2] ASoC: bf5xx-ac97: Remove unused extern declaration

Quoted 2 lines · Lars-Peter Clausen

No, this is a different one. Your patch removed the extern declaration for bf5xx_ac97_ops this one removes it for ac97, which was on the next line.

OK, applied.

maintainer Applied
#5 lore raw
In reply to Lars-Peter Clausen
Quoted 2 lines · Lars-Peter Clausen

If CONFIG_SND_BF5XX_HAVE_COLD_RESET is enabled building the blackfin ac97 driver fails with the following compile error:

Applied, thanks.