[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1396733753-9820-6-git-send-email-sre@kernel.org>
Date: Sat, 5 Apr 2014 23:35:53 +0200
From: Sebastian Reichel <sre@...nel.org>
To: Sebastian Reichel <sre@...g0.de>, Mark Brown <broonie@...nel.org>,
Peter Ujfalusi <peter.ujfalusi@...com>
Cc: Rob Herring <rob.herring@...xeda.com>,
Pawel Moll <pawel.moll@....com>,
Mark Rutland <mark.rutland@....com>,
Ian Campbell <ijc+devicetree@...lion.org.uk>,
Kumar Gala <galak@...eaurora.org>,
Tony Lindgren <tony@...mide.com>,
Liam Girdwood <lgirdwood@...il.com>,
Jarkko Nikula <jarkko.nikula@...mer.com>,
devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-omap@...r.kernel.org, alsa-devel@...a-project.org,
Sebastian Reichel <sre@...nel.org>
Subject: [PATCH 5/5] 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@...nel.org>
---
sound/soc/codecs/tlv320aic3x.c | 9 +++++++--
1 file 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) &&
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists