summaryrefslogtreecommitdiff
path: root/sound/soc/soc-io.c
diff options
context:
space:
mode:
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 5fb85783b044..dc0c09d2682a 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -204,14 +204,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;