summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Reichel <sre@kernel.org>2013-12-07 22:31:56 +0100
committerSebastian Reichel <sre@kernel.org>2014-04-23 17:35:49 +0200
commit82dba935ac8ebf4c2bdb6eb7a25ddc89b932231d (patch)
treebd7b5610d0a5a7b06602ca8ebcb4d87b7c1c9c11
parentac2735b6e7e2e8d7bf67ca824b66a61c25484b64 (diff)
downloadlinux-82dba935ac8ebf4c2bdb6eb7a25ddc89b932231d.tar.bz2
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>
-rw-r--r--sound/soc/codecs/tlv320aic3x.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index b1835103e9b4..d7349bc89ad3 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) &&