diff options
author | Xiubo Li <Li.Xiubo@freescale.com> | 2014-03-26 01:40:33 -0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-04-14 12:22:20 -0400 |
commit | 964eafb1d59b7c270982d144882c64b93c67eb03 (patch) | |
tree | ac2c8eecb21ba5965d445cf5439a88b8b0865d77 | |
parent | c0b6f59b7036c0cb7e0d03240fcb095104855ab9 (diff) |
ASoC: wm8997: 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/wm8997.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/sound/soc/codecs/wm8997.c b/sound/soc/codecs/wm8997.c index 004186b6bd48..3d50621b070c 100644 --- a/sound/soc/codecs/wm8997.c +++ b/sound/soc/codecs/wm8997.c | |||
@@ -1051,11 +1051,6 @@ static struct snd_soc_dai_driver wm8997_dai[] = { | |||
1051 | static int wm8997_codec_probe(struct snd_soc_codec *codec) | 1051 | static int wm8997_codec_probe(struct snd_soc_codec *codec) |
1052 | { | 1052 | { |
1053 | struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec); | 1053 | struct wm8997_priv *priv = snd_soc_codec_get_drvdata(codec); |
1054 | int ret; | ||
1055 | |||
1056 | ret = snd_soc_codec_set_cache_io(codec, priv->core.arizona->regmap); | ||
1057 | if (ret != 0) | ||
1058 | return ret; | ||
1059 | 1054 | ||
1060 | arizona_init_spk(codec); | 1055 | arizona_init_spk(codec); |
1061 | 1056 | ||
@@ -1086,9 +1081,17 @@ static unsigned int wm8997_digital_vu[] = { | |||
1086 | ARIZONA_DAC_DIGITAL_VOLUME_5R, | 1081 | ARIZONA_DAC_DIGITAL_VOLUME_5R, |
1087 | }; | 1082 | }; |
1088 | 1083 | ||
1084 | struct regmap *wm8997_get_regmap(struct device *dev) | ||
1085 | { | ||
1086 | struct wm8997_priv *priv = dev_get_drvdata(dev); | ||
1087 | |||
1088 | return priv->core.arizona->regmap; | ||
1089 | } | ||
1090 | |||
1089 | static struct snd_soc_codec_driver soc_codec_dev_wm8997 = { | 1091 | static struct snd_soc_codec_driver soc_codec_dev_wm8997 = { |
1090 | .probe = wm8997_codec_probe, | 1092 | .probe = wm8997_codec_probe, |
1091 | .remove = wm8997_codec_remove, | 1093 | .remove = wm8997_codec_remove, |
1094 | .get_regmap = wm8997_get_regmap, | ||
1092 | 1095 | ||
1093 | .idle_bias_off = true, | 1096 | .idle_bias_off = true, |
1094 | 1097 | ||