diff options
Diffstat (limited to 'sound/soc/soc-io.c')
-rw-r--r-- | sound/soc/soc-io.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c index c8610cbf34a5..4d8dc6a27d4d 100644 --- a/sound/soc/soc-io.c +++ b/sound/soc/soc-io.c | |||
@@ -114,6 +114,7 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
114 | enum snd_soc_control_type control) | 114 | enum snd_soc_control_type control) |
115 | { | 115 | { |
116 | struct regmap_config config; | 116 | struct regmap_config config; |
117 | int ret; | ||
117 | 118 | ||
118 | memset(&config, 0, sizeof(config)); | 119 | memset(&config, 0, sizeof(config)); |
119 | codec->write = hw_write; | 120 | codec->write = hw_write; |
@@ -140,6 +141,12 @@ int snd_soc_codec_set_cache_io(struct snd_soc_codec *codec, | |||
140 | 141 | ||
141 | case SND_SOC_REGMAP: | 142 | case SND_SOC_REGMAP: |
142 | /* Device has made its own regmap arrangements */ | 143 | /* Device has made its own regmap arrangements */ |
144 | codec->using_regmap = true; | ||
145 | |||
146 | ret = regmap_get_val_bytes(codec->control_data); | ||
147 | /* Errors are legitimate for non-integer byte multiples */ | ||
148 | if (ret > 0) | ||
149 | codec->val_bytes = ret; | ||
143 | break; | 150 | break; |
144 | 151 | ||
145 | default: | 152 | default: |