From 8e45d8fdf1fef9a6b5ab99ebca771a6db5297d49 Mon Sep 17 00:00:00 2001 From: Mark Brown Date: Mon, 21 Nov 2011 15:46:51 +0000 Subject: [PATCH] --- yaml --- r: 283741 b: refs/heads/master c: 56a926dd72bd836f71216ba5b034adb7f48e80e9 h: refs/heads/master i: 283739: e9701e13c940c2741400aefe233f8e40b09121ad v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/wm8753.c | 24 ++++++++---------------- 2 files changed, 9 insertions(+), 17 deletions(-) diff --git a/[refs] b/[refs] index 2f4a934e07de..274351448f6e 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: afe713089a5cce680ff76fab554c42d5cbb577d0 +refs/heads/master: 56a926dd72bd836f71216ba5b034adb7f48e80e9 diff --git a/trunk/sound/soc/codecs/wm8753.c b/trunk/sound/soc/codecs/wm8753.c index 3a629d0d690e..13156c836c9a 100644 --- a/trunk/sound/soc/codecs/wm8753.c +++ b/trunk/sound/soc/codecs/wm8753.c @@ -486,7 +486,7 @@ SND_SOC_DAPM_INPUT("MIC2"), SND_SOC_DAPM_VMID("VREF"), }; -static const struct snd_soc_dapm_route audio_map[] = { +static const struct snd_soc_dapm_route wm8753_dapm_routes[] = { /* left mixer */ {"Left Mixer", "Left Playback Switch", "Left DAC"}, {"Left Mixer", "Voice Playback Switch", "Voice DAC"}, @@ -640,17 +640,6 @@ static const struct snd_soc_dapm_route audio_map[] = { {"ACOP", NULL, "ALC Mixer"}, }; -static int wm8753_add_widgets(struct snd_soc_codec *codec) -{ - struct snd_soc_dapm_context *dapm = &codec->dapm; - - snd_soc_dapm_new_controls(dapm, wm8753_dapm_widgets, - ARRAY_SIZE(wm8753_dapm_widgets)); - snd_soc_dapm_add_routes(dapm, audio_map, ARRAY_SIZE(audio_map)); - - return 0; -} - /* PLL divisors */ struct _pll_div { u32 div2:1; @@ -1467,10 +1456,6 @@ static int wm8753_probe(struct snd_soc_codec *codec) snd_soc_update_bits(codec, WM8753_LINVOL, 0x0100, 0x0100); snd_soc_update_bits(codec, WM8753_RINVOL, 0x0100, 0x0100); - snd_soc_add_controls(codec, wm8753_snd_controls, - ARRAY_SIZE(wm8753_snd_controls)); - wm8753_add_widgets(codec); - return 0; } @@ -1492,6 +1477,13 @@ static struct snd_soc_codec_driver soc_codec_dev_wm8753 = { .reg_cache_size = ARRAY_SIZE(wm8753_reg), .reg_word_size = sizeof(u16), .reg_cache_default = wm8753_reg, + + .controls = wm8753_snd_controls, + .num_controls = ARRAY_SIZE(wm8753_snd_controls), + .dapm_widgets = wm8753_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(wm8753_dapm_widgets), + .dapm_routes = wm8753_dapm_routes, + .num_dapm_routes = ARRAY_SIZE(wm8753_dapm_routes), }; static const struct of_device_id wm8753_of_match[] = {