diff options
author | Mark Brown <broonie@linaro.org> | 2013-09-25 16:10:33 +0400 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-09-25 16:30:58 +0400 |
commit | 806955dd9cf071ecd99acbaa8c73ae1f34dcf83d (patch) | |
tree | a281ec0c348f50971aa1a208a65c8d0093111b6a /sound/soc/codecs/tlv320aic26.c | |
parent | 4a10c2ac2f368583138b774ca41fac4207911983 (diff) | |
download | linux-806955dd9cf071ecd99acbaa8c73ae1f34dcf83d.tar.xz |
ASoC: tlv320aic26: Convert to table based control init
Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'sound/soc/codecs/tlv320aic26.c')
-rw-r--r-- | sound/soc/codecs/tlv320aic26.c | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/sound/soc/codecs/tlv320aic26.c b/sound/soc/codecs/tlv320aic26.c index 7b8f3d965f43..32c6b0768e56 100644 --- a/sound/soc/codecs/tlv320aic26.c +++ b/sound/soc/codecs/tlv320aic26.c @@ -377,7 +377,7 @@ static DEVICE_ATTR(keyclick, 0644, aic26_keyclick_show, aic26_keyclick_set); static int aic26_probe(struct snd_soc_codec *codec) { struct aic26 *aic26 = dev_get_drvdata(codec->dev); - int ret, err, i, reg; + int ret, i, reg; aic26->codec = codec; @@ -403,12 +403,6 @@ static int aic26_probe(struct snd_soc_codec *codec) if (ret) dev_info(codec->dev, "error creating sysfs files\n"); - /* register controls */ - dev_dbg(codec->dev, "Registering controls\n"); - err = snd_soc_add_codec_controls(codec, aic26_snd_controls, - ARRAY_SIZE(aic26_snd_controls)); - WARN_ON(err < 0); - return 0; } @@ -418,6 +412,8 @@ static struct snd_soc_codec_driver aic26_soc_codec_dev = { .write = aic26_reg_write, .reg_cache_size = AIC26_NUM_REGS, .reg_word_size = sizeof(u16), + .controls = aic26_snd_controls, + .num_controls = ARRAY_SIZE(aic26_snd_controls), .dapm_widgets = tlv320aic26_dapm_widgets, .num_dapm_widgets = ARRAY_SIZE(tlv320aic26_dapm_widgets), .dapm_routes = tlv320aic26_dapm_routes, |