]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ASoC: wm8770: Conver to table based DAPM and control init
authorMark Brown <broonie@opensource.wolfsonmicro.com>
Wed, 10 Oct 2012 11:41:37 +0000 (20:41 +0900)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 15 Oct 2012 02:49:41 +0000 (11:49 +0900)
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
sound/soc/codecs/wm8770.c

index 90920315f5366b62bc13e2acaa0dca8781f57ca7..0b690ba875f84ba1bd2df6934afc27930a81a29b 100644 (file)
@@ -614,13 +614,6 @@ static int wm8770_probe(struct snd_soc_codec *codec)
        /* mute all DACs */
        snd_soc_update_bits(codec, WM8770_DACMUTE, 0x10, 0x10);
 
-       snd_soc_add_codec_controls(codec, wm8770_snd_controls,
-                            ARRAY_SIZE(wm8770_snd_controls));
-       snd_soc_dapm_new_controls(&codec->dapm, wm8770_dapm_widgets,
-                                 ARRAY_SIZE(wm8770_dapm_widgets));
-       snd_soc_dapm_add_routes(&codec->dapm, wm8770_intercon,
-                               ARRAY_SIZE(wm8770_intercon));
-
 err_reg_enable:
        regulator_bulk_disable(ARRAY_SIZE(wm8770->supplies), wm8770->supplies);
        return ret;
@@ -630,6 +623,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8770 = {
        .probe = wm8770_probe,
        .set_bias_level = wm8770_set_bias_level,
        .idle_bias_off = true,
+
+       .controls = wm8770_snd_controls,
+       .num_controls = ARRAY_SIZE(wm8770_snd_controls),
+       .dapm_widgets = wm8770_dapm_widgets,
+       .num_dapm_widgets = ARRAY_SIZE(wm8770_dapm_widgets),
+       .dapm_routes = wm8770_intercon,
+       .num_dapm_routes = ARRAY_SIZE(wm8770_intercon),
 };
 
 static const struct of_device_id wm8770_of_match[] = {