summaryrefslogtreecommitdiff
path: root/sound/soc/soc-io.c
diff options
context:
space:
mode:
authorXiubo Li <Li.Xiubo@freescale.com>2014-03-26 13:40:23 +0800
committerMark Brown <broonie@linaro.org>2014-04-14 17:22:18 +0100
commita39f75f7907fa3a708751dc283e3ab3e7da526b8 (patch)
tree464d1902678907ac8ab6f8999f6f49381e0fcaa2 /sound/soc/soc-io.c
parentc9eaa447e77efe77b7fa4c953bd62de8297fd6c5 (diff)
ASoC: core: Move the default regmap I/O setting to snd_soc_register_codec()
Add the default regmap I/O setting to snd_soc_register_codec() while the CODEC is initialising, which will be called by CODEC driver device probe(), and then we can make XXX_set_cache_io() go away entirely from each CODEC ASoC probe. Signed-off-by: Xiubo Li <Li.Xiubo@freescale.com> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/soc-io.c')
-rw-r--r--sound/soc/soc-io.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 260efc8466fc..6480e8f29310 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -60,14 +60,11 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec,
{
int ret;
- /* Device has made its own regmap arrangements */
if (!regmap)
- codec->control_data = dev_get_regmap(codec->dev, NULL);
- else
- codec->control_data = regmap;
+ return -EINVAL;
- if (IS_ERR(codec->control_data))
- return PTR_ERR(codec->control_data);
+ /* Device has made its own regmap arrangements */
+ codec->control_data = regmap;
codec->write = hw_write;
codec->read = hw_read;