summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cq93vc.c
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-03-26 13:40:25 +0800
committerMark Brown <broonie@linaro.org>2014-04-14 17:22:19 +0100
commit49101a25acd69cf36192888392c518a299c091af (patch)
treed30eb97ffbd9d27de34428221c3ac1536e7da668 /sound/soc/codecs/cq93vc.c
parentbbc0bd7fd3f671096625b5cbde97e12e3e2dba8f (diff)
ASoC: cq93vc: 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> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/cq93vc.c')
-rw-r--r--sound/soc/codecs/cq93vc.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/sound/soc/codecs/cq93vc.c b/sound/soc/codecs/cq93vc.c
index 1e25c7af853b..5e5518d20311 100644
--- a/sound/soc/codecs/cq93vc.c
+++ b/sound/soc/codecs/cq93vc.c
@@ -139,8 +139,6 @@ static int cq93vc_probe(struct snd_soc_codec *codec)
davinci_vc->cq93vc.codec = codec;
- snd_soc_codec_set_cache_io(codec, davinci_vc->regmap);
-
/* Off, with power on */
cq93vc_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
@@ -154,11 +152,19 @@ static int cq93vc_remove(struct snd_soc_codec *codec)
return 0;
}
+struct regmap *cq93vc_get_regmap(struct device *dev)
+{
+ struct davinci_vc *davinci_vc = codec->dev->platform_data;
+
+ return davinci_vc->regmap;
+}
+
static struct snd_soc_codec_driver soc_codec_dev_cq93vc = {
.set_bias_level = cq93vc_set_bias_level,
.probe = cq93vc_probe,
.remove = cq93vc_remove,
.resume = cq93vc_resume,
+ .get_regmap = cq93vc_get_regmap,
.controls = cq93vc_snd_controls,
.num_controls = ARRAY_SIZE(cq93vc_snd_controls),
};