diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-05 10:46:36 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-05 15:49:51 +0100 |
commit | b131c02e99b9da672a2b0cf96bad48d74c39572e (patch) | |
tree | 6a504296d232321e59a06220447abef9c50239d2 /sound/soc/codecs/wm8995.c | |
parent | Linux 3.18-rc1 (diff) | |
download | linux-b131c02e99b9da672a2b0cf96bad48d74c39572e.tar.xz linux-b131c02e99b9da672a2b0cf96bad48d74c39572e.zip |
ASoC: wm8995: Use table based DAPM and control setup
Makes the code a bit cleaner.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Charles Keepax <ckeepax@opensource.wolfsonmicro.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc/codecs/wm8995.c')
-rw-r--r-- | sound/soc/codecs/wm8995.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8995.c b/sound/soc/codecs/wm8995.c index 1288edeb8c7d..e40c8a662183 100644 --- a/sound/soc/codecs/wm8995.c +++ b/sound/soc/codecs/wm8995.c @@ -2102,13 +2102,6 @@ static int wm8995_probe(struct snd_soc_codec *codec) wm8995_update_class_w(codec); - snd_soc_add_codec_controls(codec, wm8995_snd_controls, - ARRAY_SIZE(wm8995_snd_controls)); - snd_soc_dapm_new_controls(&codec->dapm, wm8995_dapm_widgets, - ARRAY_SIZE(wm8995_dapm_widgets)); - snd_soc_dapm_add_routes(&codec->dapm, wm8995_intercon, - ARRAY_SIZE(wm8995_intercon)); - return 0; err_reg_enable: @@ -2205,6 +2198,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8995 = { .remove = wm8995_remove, .set_bias_level = wm8995_set_bias_level, .idle_bias_off = true, + + .controls = wm8995_snd_controls, + .num_controls = ARRAY_SIZE(wm8995_snd_controls), + .dapm_widgets = wm8995_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8995_dapm_widgets), + .dapm_routes = wm8995_intercon, + .num_dapm_routes = ARRAY_SIZE(wm8995_intercon), }; static struct regmap_config wm8995_regmap = { |