Commit 78c51bc6 authored by Mark Brown's avatar Mark Brown

ASoC: ak4671: Convert to table based control init

Saves code and adds error handling.
Signed-off-by: default avatarMark Brown <broonie@linaro.org>
parent 38dbfb59
...@@ -628,9 +628,6 @@ static int ak4671_probe(struct snd_soc_codec *codec) ...@@ -628,9 +628,6 @@ static int ak4671_probe(struct snd_soc_codec *codec)
return ret; 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); ak4671_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
return ret; return ret;
...@@ -646,6 +643,8 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4671 = { ...@@ -646,6 +643,8 @@ static struct snd_soc_codec_driver soc_codec_dev_ak4671 = {
.probe = ak4671_probe, .probe = ak4671_probe,
.remove = ak4671_remove, .remove = ak4671_remove,
.set_bias_level = ak4671_set_bias_level, .set_bias_level = ak4671_set_bias_level,
.controls = ak4671_snd_controls,
.num_controls = ARRAY_SIZE(ak4671_snd_controls),
.reg_cache_size = AK4671_CACHEREGNUM, .reg_cache_size = AK4671_CACHEREGNUM,
.reg_word_size = sizeof(u8), .reg_word_size = sizeof(u8),
.reg_cache_default = ak4671_reg, .reg_cache_default = ak4671_reg,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment