diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-05 04:46:35 -0500 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-05 09:49:29 -0500 |
commit | c4f50dbc56580bc5fc84667860e973ca24291697 (patch) | |
tree | 819c28831806a4ba0bce289e4ba34d9bc464feb3 /sound/soc | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) |
ASoC: wm8961: 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')
-rw-r--r-- | sound/soc/codecs/wm8961.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/sound/soc/codecs/wm8961.c b/sound/soc/codecs/wm8961.c index 41d23e920ad5..e077bb2f0740 100644 --- a/sound/soc/codecs/wm8961.c +++ b/sound/soc/codecs/wm8961.c | |||
@@ -835,7 +835,6 @@ static struct snd_soc_dai_driver wm8961_dai = { | |||
835 | 835 | ||
836 | static int wm8961_probe(struct snd_soc_codec *codec) | 836 | static int wm8961_probe(struct snd_soc_codec *codec) |
837 | { | 837 | { |
838 | struct snd_soc_dapm_context *dapm = &codec->dapm; | ||
839 | u16 reg; | 838 | u16 reg; |
840 | 839 | ||
841 | /* Enable class W */ | 840 | /* Enable class W */ |
@@ -873,12 +872,6 @@ static int wm8961_probe(struct snd_soc_codec *codec) | |||
873 | 872 | ||
874 | wm8961_set_bias_level(codec, SND_SOC_BIAS_STANDBY); | 873 | wm8961_set_bias_level(codec, SND_SOC_BIAS_STANDBY); |
875 | 874 | ||
876 | snd_soc_add_codec_controls(codec, wm8961_snd_controls, | ||
877 | ARRAY_SIZE(wm8961_snd_controls)); | ||
878 | snd_soc_dapm_new_controls(dapm, wm8961_dapm_widgets, | ||
879 | ARRAY_SIZE(wm8961_dapm_widgets)); | ||
880 | snd_soc_dapm_add_routes(dapm, audio_paths, ARRAY_SIZE(audio_paths)); | ||
881 | |||
882 | return 0; | 875 | return 0; |
883 | } | 876 | } |
884 | 877 | ||
@@ -915,6 +908,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8961 = { | |||
915 | .suspend = wm8961_suspend, | 908 | .suspend = wm8961_suspend, |
916 | .resume = wm8961_resume, | 909 | .resume = wm8961_resume, |
917 | .set_bias_level = wm8961_set_bias_level, | 910 | .set_bias_level = wm8961_set_bias_level, |
911 | |||
912 | .controls = wm8961_snd_controls, | ||
913 | .num_controls = ARRAY_SIZE(wm8961_snd_controls), | ||
914 | .dapm_widgets = wm8961_dapm_widgets, | ||
915 | .num_dapm_widgets = ARRAY_SIZE(wm8961_dapm_widgets), | ||
916 | .dapm_routes = audio_paths, | ||
917 | .num_dapm_routes = ARRAY_SIZE(audio_paths), | ||
918 | }; | 918 | }; |
919 | 919 | ||
920 | static const struct regmap_config wm8961_regmap = { | 920 | static const struct regmap_config wm8961_regmap = { |