summaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/ak4671.c
diff options
context:
space:
mode:
authorMark Brown <broonie@linaro.org>2014-02-11 19:51:58 +0000
committerMark Brown <broonie@linaro.org>2014-02-11 20:40:10 +0000
commit78c51bc6475982a843947a556853affd2c360b19 (patch)
treeadd816bb180189fec353faab410c7760e90962a3 /sound/soc/codecs/ak4671.c
parent38dbfb59d1175ef458d006556061adeaa8751b72 (diff)
downloadop-kernel-dev-78c51bc6475982a843947a556853affd2c360b19.zip
op-kernel-dev-78c51bc6475982a843947a556853affd2c360b19.tar.gz
ASoC: ak4671: Convert to table based control init
Saves code and adds error handling. Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/ak4671.c')
-rw-r--r--sound/soc/codecs/ak4671.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c
index 25bdf6a..456bd0a 100644
--- a/sound/soc/codecs/ak4671.c
+++ b/sound/soc/codecs/ak4671.c
@@ -628,9 +628,6 @@ static int ak4671_probe(struct snd_soc_codec *codec)
return ret;
}
- snd_soc_add_codec_controls(codec, ak4671_snd_controls,
- ARRAY_SIZE(ak4671_snd_controls));
-
ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return ret;
@@ -646,6 +643,8 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4671 = {
.probe = ak4671_probe,
.remove = ak4671_remove,
.set_bias_level = ak4671_set_bias_level,
+ .controls = ak4671_snd_controls,
+ .num_controls = ARRAY_SIZE(ak4671_snd_controls),
.reg_cache_size = AK4671_CACHEREGNUM,
.reg_word_size = sizeof(u8),
.reg_cache_default = ak4671_reg,
OpenPOWER on IntegriCloud