diff options
author | Mark Brown <broonie@linaro.org> | 2014-02-11 14:51:58 -0500 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2014-02-11 15:40:10 -0500 |
commit | 78c51bc6475982a843947a556853affd2c360b19 (patch) | |
tree | add816bb180189fec353faab410c7760e90962a3 | |
parent | 38dbfb59d1175ef458d006556061adeaa8751b72 (diff) |
ASoC: ak4671: Convert to table based control init
Saves code and adds error handling.
Signed-off-by: Mark Brown <broonie@linaro.org>
-rw-r--r-- | sound/soc/codecs/ak4671.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/sound/soc/codecs/ak4671.c b/sound/soc/codecs/ak4671.c index 25bdf6ad4a54..456bd0a065b1 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) | |||
628 | return ret; | 628 | return ret; |
629 | } | 629 | } |
630 | 630 | ||
631 | snd_soc_add_codec_controls(codec, ak4671_snd_controls, | ||
632 | ARRAY_SIZE(ak4671_snd_controls)); | ||
633 | |||
634 | ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 631 | ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
635 | 632 | ||
636 | return ret; | 633 | return ret; |
@@ -646,6 +643,8 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4671 = { | |||
646 | .probe = ak4671_probe, | 643 | .probe = ak4671_probe, |
647 | .remove = ak4671_remove, | 644 | .remove = ak4671_remove, |
648 | .set_bias_level = ak4671_set_bias_level, | 645 | .set_bias_level = ak4671_set_bias_level, |
646 | .controls = ak4671_snd_controls, | ||
647 | .num_controls = ARRAY_SIZE(ak4671_snd_controls), | ||
649 | .reg_cache_size = AK4671_CACHEREGNUM, | 648 | .reg_cache_size = AK4671_CACHEREGNUM, |
650 | .reg_word_size = sizeof(u8), | 649 | .reg_word_size = sizeof(u8), |
651 | .reg_cache_default = ak4671_reg, | 650 | .reg_cache_default = ak4671_reg, |