[alsa-devel] [PATCH 2/3] ASoC: uda1380: Fix missed uda1380_reset call if pdata->gpio_power is a valid gpio

Axel Lin axel.lin at gmail.com
Sun Dec 4 12:37:32 CET 2011


Current code does not call uda1380_reset() in uda1380_probe() if
pdata->gpio_power is a valid gpio. Fix it.

Also remove a redundant "Failed to issue reset" error message.
We already show error message in uda1380_reset() error path.

Signed-off-by: Axel Lin <axel.lin at gmail.com>
---
I don't has this hardware, I'd appreciate if someone can test this patch.
Axel
 sound/soc/codecs/uda1380.c |   10 ++++------
 1 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/sound/soc/codecs/uda1380.c b/sound/soc/codecs/uda1380.c
index 3a238cb..7ebfbeb 100644
--- a/sound/soc/codecs/uda1380.c
+++ b/sound/soc/codecs/uda1380.c
@@ -747,14 +747,12 @@ static int uda1380_probe(struct snd_soc_codec *codec)
 		ret = gpio_direction_output(pdata->gpio_power, 0);
 		if (ret)
 			goto err_gpio_power_conf;
-	} else {
-		ret = uda1380_reset(codec);
-		if (ret) {
-			dev_err(codec->dev, "Failed to issue reset\n");
-			goto err_reset;
-		}
 	}
 
+	ret = uda1380_reset(codec);
+	if (ret)
+		goto err_reset;
+
 	INIT_WORK(&uda1380->work, uda1380_flush_work);
 
 	/* power on device */
-- 
1.7.5.4





More information about the Alsa-devel mailing list