[prev in list] [next in list] [prev in thread] [next in thread] 

List:       git-commits-head
Subject:    ASoC: tlv320aic3x: fix shared reset pin for DT
From:       "Linux Kernel Mailing List" <linux-kernel () vger ! kernel ! org>
Date:       2014-04-30 15:36:28
Message-ID: 20140430153628.7BE66660E86 () gitolite ! kernel ! org
[Download RAW message or body]

Gitweb:     http://git.kernel.org/linus/;a=commit;h=3b5b24315781c744ab3868edee931ddb2145e6b5
Commit:     3b5b24315781c744ab3868edee931ddb2145e6b5
Parent:     c9eaa447e77efe77b7fa4c953bd62de8297fd6c5
Author:     Sebastian Reichel <sre@kernel.org>
AuthorDate: Sat Apr 5 23:35:53 2014 +0200
Committer:  Mark Brown <broonie@linaro.org>
CommitDate: Tue Apr 15 13:23:52 2014 +0100

    ASoC: tlv320aic3x: fix shared reset pin for DT
    
    Currently the second tlv320aic3x instance fails to
    be probed from DT if the reset pin is shared with
    the first one.
    
    This patch fixes it by moving the list add of the
    reset pin into the i2c_probe method.
    
    Signed-off-by: Sebastian Reichel <sre@kernel.org>
    Signed-off-by: Mark Brown <broonie@linaro.org>
---
 sound/soc/codecs/tlv320aic3x.c |    9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index b183510..d7349bc 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1399,7 +1399,6 @@ static int aic3x_probe(struct snd_soc_codec *codec)
 	}
 
 	aic3x_add_widgets(codec);
-	list_add(&aic3x->list, &reset_list);
 
 	return 0;
 
@@ -1569,7 +1568,13 @@ static int aic3x_i2c_probe(struct i2c_client *i2c,
 
 	ret = snd_soc_register_codec(&i2c->dev,
 			&soc_codec_dev_aic3x, &aic3x_dai, 1);
-	return ret;
+
+	if (ret != 0)
+		goto err_gpio;
+
+	list_add(&aic3x->list, &reset_list);
+
+	return 0;
 
 err_gpio:
 	if (gpio_is_valid(aic3x->gpio_reset) &&
--
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic