ASoC: Use table based init for wm8731_snd_controls
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 21 Nov 2011 12:59:52 +0000 (12:59 +0000)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 21 Nov 2011 17:00:17 +0000 (17:00 +0000)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8731.c

index 7e5ec03f6f8dd579d1bd43413fd1d007a1989bcb..f5161f383fc4ea8e2f008078115bf0a51ebfdf00 100644 (file)
@@ -553,9 +553,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);
 
@@ -595,6 +592,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[] = {