From 261dde0aff4e96c99089760770d2f02be55e043e Mon Sep 17 00:00:00 2001 From: Lu Guanqun Date: Wed, 30 Mar 2011 21:53:17 +0800 Subject: [PATCH] --- yaml --- r: 248244 b: refs/heads/master c: e27808df97ff7b43b4927aadf410705f33313523 h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/sound/soc/codecs/sn95031.c | 17 +++++------------ 2 files changed, 6 insertions(+), 13 deletions(-) diff --git a/[refs] b/[refs] index 9ff5f41c198e..fe79704e4a50 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: b63c963da21d05f40f20de0a586143922bfa19d9 +refs/heads/master: e27808df97ff7b43b4927aadf410705f33313523 diff --git a/trunk/sound/soc/codecs/sn95031.c b/trunk/sound/soc/codecs/sn95031.c index 2a30eae1881c..569555f4a92f 100644 --- a/trunk/sound/soc/codecs/sn95031.c +++ b/trunk/sound/soc/codecs/sn95031.c @@ -825,8 +825,6 @@ EXPORT_SYMBOL_GPL(sn95031_jack_detection); /* codec registration */ static int sn95031_codec_probe(struct snd_soc_codec *codec) { - int ret; - pr_debug("codec_probe called\n"); codec->dapm.bias_level = SND_SOC_BIAS_OFF; @@ -877,16 +875,7 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec) snd_soc_add_controls(codec, sn95031_snd_controls, ARRAY_SIZE(sn95031_snd_controls)); - ret = snd_soc_dapm_new_controls(&codec->dapm, sn95031_dapm_widgets, - ARRAY_SIZE(sn95031_dapm_widgets)); - if (ret) - pr_err("soc_dapm_new_control failed %d", ret); - ret = snd_soc_dapm_add_routes(&codec->dapm, sn95031_audio_map, - ARRAY_SIZE(sn95031_audio_map)); - if (ret) - pr_err("soc_dapm_add_routes failed %d", ret); - - return ret; + return 0; } static int sn95031_codec_remove(struct snd_soc_codec *codec) @@ -903,6 +892,10 @@ struct snd_soc_codec_driver sn95031_codec = { .read = sn95031_read, .write = sn95031_write, .set_bias_level = sn95031_set_vaud_bias, + .dapm_widgets = sn95031_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(sn95031_dapm_widgets), + .dapm_routes = sn95031_audio_map, + .num_dapm_routes = ARRAY_SIZE(sn95031_audio_map), }; static int __devinit sn95031_device_probe(struct platform_device *pdev)