From: Mark Brown Date: Tue, 22 Nov 2011 23:19:41 +0000 (+0000) Subject: ASoC: Convert wm8776 to table based control and DAPM init X-Git-Tag: v3.3-rc1~14^2~322 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1db3c98e18962557ce9d9fd0b895c8a6e41c96fd;p=profile%2Fivi%2Fkernel-x86-ivi.git ASoC: Convert wm8776 to table based control and DAPM init Signed-off-by: Mark Brown --- diff --git a/sound/soc/codecs/wm8776.c b/sound/soc/codecs/wm8776.c index bfdc523..f967c59d 100644 --- a/sound/soc/codecs/wm8776.c +++ b/sound/soc/codecs/wm8776.c @@ -414,12 +414,6 @@ static int wm8776_probe(struct snd_soc_codec *codec) snd_soc_update_bits(codec, WM8776_HPRVOL, 0x100, 0x100); snd_soc_update_bits(codec, WM8776_DACRVOL, 0x100, 0x100); - snd_soc_add_controls(codec, wm8776_snd_controls, - ARRAY_SIZE(wm8776_snd_controls)); - snd_soc_dapm_new_controls(dapm, wm8776_dapm_widgets, - ARRAY_SIZE(wm8776_dapm_widgets)); - snd_soc_dapm_add_routes(dapm, routes, ARRAY_SIZE(routes)); - return ret; } @@ -439,6 +433,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8776 = { .reg_cache_size = ARRAY_SIZE(wm8776_reg), .reg_word_size = sizeof(u16), .reg_cache_default = wm8776_reg, + + .controls = wm8776_snd_controls, + .num_controls = ARRAY_SIZE(wm8776_snd_controls), + .dapm_widgets = wm8776_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8776_dapm_widgets), + .dapm_routes = routes, + .num_dapm_routes = ARRAY_SIZE(routes), }; static const struct of_device_id wm8776_of_match[] = {