aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-03-26 01:40:28 -0400
committerMark Brown <broonie@linaro.org>2014-04-14 12:22:19 -0400
commitc8b02acd45e4b30aef2a86526e6844071cfd41bf (patch)
treed7cb5956779023d497b07b200aae8380102bf322
parent83905ef3cbd0025830e9db65bf5ce7db721e39a7 (diff)
ASoC: wm5102: Remove the set_cache_io() entirely from ASoC probe.
As we can set the CODEC I/O while snd_soc_register_codec(), so the calling of set_cache_io() from CODEC ASoC probe could be removed entirely. And then we can set the CODEC I/O in the device probe instead of CODEC ASoC probe as earily as possible. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com> Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r--sound/soc/codecs/wm5102.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/sound/soc/codecs/wm5102.c b/sound/soc/codecs/wm5102.c
index dcf1d12cfef8..aa60ba23b017 100644
--- a/sound/soc/codecs/wm5102.c
+++ b/sound/soc/codecs/wm5102.c
@@ -1760,10 +1760,6 @@ static int wm5102_codec_probe(struct snd_soc_codec *codec)
1760 struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec); 1760 struct wm5102_priv *priv = snd_soc_codec_get_drvdata(codec);
1761 int ret; 1761 int ret;
1762 1762
1763 ret = snd_soc_codec_set_cache_io(codec, priv->core.arizona->regmap);
1764 if (ret != 0)
1765 return ret;
1766
1767 ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 2); 1763 ret = snd_soc_add_codec_controls(codec, wm_adsp2_fw_controls, 2);
1768 if (ret != 0) 1764 if (ret != 0)
1769 return ret; 1765 return ret;
@@ -1802,9 +1798,17 @@ static unsigned int wm5102_digital_vu[] = {
1802 ARIZONA_DAC_DIGITAL_VOLUME_5R, 1798 ARIZONA_DAC_DIGITAL_VOLUME_5R,
1803}; 1799};
1804 1800
1801struct regmap *wm5102_get_regmap(struct device *dev)
1802{
1803 struct wm5102_priv *priv = dev_get_drvdata(dev);
1804
1805 return priv->core.arizona->regmap;
1806}
1807
1805static struct snd_soc_codec_driver soc_codec_dev_wm5102 = { 1808static struct snd_soc_codec_driver soc_codec_dev_wm5102 = {
1806 .probe = wm5102_codec_probe, 1809 .probe = wm5102_codec_probe,
1807 .remove = wm5102_codec_remove, 1810 .remove = wm5102_codec_remove,
1811 .get_regmap = wm5102_get_regmap,
1808 1812
1809 .idle_bias_off = true, 1813 .idle_bias_off = true,
1810 1814