[alsa-devel] [PATCH] ASoC: Use table based init for wm8731_snd_controls
Mark Brown
broonie at opensource.wolfsonmicro.com
Mon Nov 21 14:01:32 CET 2011
Signed-off-by: Mark Brown <broonie at opensource.wolfsonmicro.com>
---
sound/soc/codecs/wm8731.c | 5 ++---
1 files changed, 2 insertions(+), 3 deletions(-)
diff --git a/sound/soc/codecs/wm8731.c b/sound/soc/codecs/wm8731.c
index 4030a9c..b7abe33 100644
--- a/sound/soc/codecs/wm8731.c
+++ b/sound/soc/codecs/wm8731.c
@@ -559,9 +559,6 @@ static int wm8731_probe(struct snd_soc_codec *codec)
/* Disable bypass path by default */
snd_soc_update_bits(codec, WM8731_APANA, 0x8, 0);
- snd_soc_add_controls(codec, wm8731_snd_controls,
- ARRAY_SIZE(wm8731_snd_controls));
-
/* Regulators will have been enabled by bias management */
regulator_bulk_disable(ARRAY_SIZE(wm8731->supplies), wm8731->supplies);
@@ -598,6 +595,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8731 = {
.num_dapm_widgets = ARRAY_SIZE(wm8731_dapm_widgets),
.dapm_routes = wm8731_intercon,
.num_dapm_routes = ARRAY_SIZE(wm8731_intercon),
+ .controls = wm8731_snd_controls,
+ .num_controls = ARRAY_SIZE(wm8731_snd_controls),
};
static const struct of_device_id wm8731_of_match[] = {
--
1.7.7.3
More information about the Alsa-devel
mailing list