aboutsummaryrefslogtreecommitdiffstats
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.c28
1 files changed, 0 insertions, 28 deletions
diff --git a/sound/soc/soc-io.c b/sound/soc/soc-io.c
index 7767fbd73eb7..9b3939049cef 100644
--- a/sound/soc/soc-io.c
+++ b/sound/soc/soc-io.c
@@ -271,31 +271,3 @@ int snd_soc_platform_write(struct snd_soc_platform *platform,
271 return snd_soc_component_write(&platform->component, reg, val); 271 return snd_soc_component_write(&platform->component, reg, val);
272} 272}
273EXPORT_SYMBOL_GPL(snd_soc_platform_write); 273EXPORT_SYMBOL_GPL(snd_soc_platform_write);
274
275/**
276 * snd_soc_component_init_io() - Initialize regmap IO
277 *
278 * @component: component to initialize
279 * @regmap: regmap instance to use for IO operations
280 *
281 * Return: 0 on success, a negative error code otherwise
282 */
283int snd_soc_component_init_io(struct snd_soc_component *component,
284 struct regmap *regmap)
285{
286 int ret;
287
288 if (!regmap)
289 return -EINVAL;
290
291 ret = regmap_get_val_bytes(regmap);
292 /* Errors are legitimate for non-integer byte
293 * multiples */
294 if (ret > 0)
295 component->val_bytes = ret;
296
297 component->regmap = regmap;
298
299 return 0;
300}
301EXPORT_SYMBOL_GPL(snd_soc_component_init_io);