提交 0a3f5e35 编写于 作者: M Mark Brown

ASoC: Remove redundant snd_soc_dapm_new_widgets() calls

The DAPM widgets are now insntantiated by the core when creating the card
so there is no need for the individual CODEC drivers to do so.
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
上级 c871a053
...@@ -385,7 +385,6 @@ static int ad1836_probe(struct platform_device *pdev) ...@@ -385,7 +385,6 @@ static int ad1836_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, ad1836_dapm_widgets, snd_soc_dapm_new_controls(codec, ad1836_dapm_widgets,
ARRAY_SIZE(ad1836_dapm_widgets)); ARRAY_SIZE(ad1836_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);
pcm_err: pcm_err:
return ret; return ret;
......
...@@ -592,7 +592,6 @@ static int ad1938_probe(struct platform_device *pdev) ...@@ -592,7 +592,6 @@ static int ad1938_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, ad1938_dapm_widgets, snd_soc_dapm_new_controls(codec, ad1938_dapm_widgets,
ARRAY_SIZE(ad1938_dapm_widgets)); ARRAY_SIZE(ad1938_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);
ad1938_set_bias_level(codec, SND_SOC_BIAS_STANDBY); ad1938_set_bias_level(codec, SND_SOC_BIAS_STANDBY);
......
...@@ -294,7 +294,6 @@ static int ak4535_add_widgets(struct snd_soc_codec *codec) ...@@ -294,7 +294,6 @@ static int ak4535_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -441,7 +441,6 @@ static int ak4671_add_widgets(struct snd_soc_codec *codec) ...@@ -441,7 +441,6 @@ static int ak4671_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -93,7 +93,6 @@ static int cx20442_add_widgets(struct snd_soc_codec *codec) ...@@ -93,7 +93,6 @@ static int cx20442_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, cx20442_audio_map, snd_soc_dapm_add_routes(codec, cx20442_audio_map,
ARRAY_SIZE(cx20442_audio_map)); ARRAY_SIZE(cx20442_audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -210,7 +210,6 @@ static int ssm2602_add_widgets(struct snd_soc_codec *codec) ...@@ -210,7 +210,6 @@ static int ssm2602_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_conn, ARRAY_SIZE(audio_conn)); snd_soc_dapm_add_routes(codec, audio_conn, ARRAY_SIZE(audio_conn));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -395,7 +395,6 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec) ...@@ -395,7 +395,6 @@ static int tlv320aic23_add_widgets(struct snd_soc_codec *codec)
/* set up audio path interconnects */ /* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -753,7 +753,6 @@ static int aic3x_add_widgets(struct snd_soc_codec *codec) ...@@ -753,7 +753,6 @@ static int aic3x_add_widgets(struct snd_soc_codec *codec)
/* set up audio path interconnects */ /* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -462,7 +462,6 @@ static int dac33_add_widgets(struct snd_soc_codec *codec) ...@@ -462,7 +462,6 @@ static int dac33_add_widgets(struct snd_soc_codec *codec)
/* set up audio path interconnects */ /* set up audio path interconnects */
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -1493,7 +1493,6 @@ static int twl4030_add_widgets(struct snd_soc_codec *codec) ...@@ -1493,7 +1493,6 @@ static int twl4030_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -378,7 +378,6 @@ static int uda1380_add_widgets(struct snd_soc_codec *codec) ...@@ -378,7 +378,6 @@ static int uda1380_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -800,7 +800,7 @@ static int wm8350_add_widgets(struct snd_soc_codec *codec) ...@@ -800,7 +800,7 @@ static int wm8350_add_widgets(struct snd_soc_codec *codec)
return ret; return ret;
} }
return snd_soc_dapm_new_widgets(codec); return 0;
} }
static int wm8350_set_dai_sysclk(struct snd_soc_dai *codec_dai, static int wm8350_set_dai_sysclk(struct snd_soc_dai *codec_dai,
......
...@@ -915,7 +915,6 @@ static int wm8400_add_widgets(struct snd_soc_codec *codec) ...@@ -915,7 +915,6 @@ static int wm8400_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -219,7 +219,6 @@ static int wm8510_add_widgets(struct snd_soc_codec *codec) ...@@ -219,7 +219,6 @@ static int wm8510_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -117,7 +117,6 @@ static int wm8523_add_widgets(struct snd_soc_codec *codec) ...@@ -117,7 +117,6 @@ static int wm8523_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -315,7 +315,6 @@ static int wm8580_add_widgets(struct snd_soc_codec *codec) ...@@ -315,7 +315,6 @@ static int wm8580_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -99,7 +99,6 @@ static int wm8711_add_widgets(struct snd_soc_codec *codec) ...@@ -99,7 +99,6 @@ static int wm8711_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -74,8 +74,6 @@ static int wm8728_add_widgets(struct snd_soc_codec *codec) ...@@ -74,8 +74,6 @@ static int wm8728_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -159,7 +159,6 @@ static int wm8731_add_widgets(struct snd_soc_codec *codec) ...@@ -159,7 +159,6 @@ static int wm8731_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -403,7 +403,6 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec) ...@@ -403,7 +403,6 @@ static int wm8750_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -673,7 +673,6 @@ static int wm8753_add_widgets(struct snd_soc_codec *codec) ...@@ -673,7 +673,6 @@ static int wm8753_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -618,8 +618,6 @@ static int wm8900_add_widgets(struct snd_soc_codec *codec) ...@@ -618,8 +618,6 @@ static int wm8900_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -919,8 +919,6 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec) ...@@ -919,8 +919,6 @@ static int wm8903_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon)); snd_soc_dapm_add_routes(codec, intercon, ARRAY_SIZE(intercon));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -298,7 +298,6 @@ static int wm8940_add_widgets(struct snd_soc_codec *codec) ...@@ -298,7 +298,6 @@ static int wm8940_add_widgets(struct snd_soc_codec *codec)
ret = snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); ret = snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
if (ret) if (ret)
goto error_ret; goto error_ret;
ret = snd_soc_dapm_new_widgets(codec);
error_ret: error_ret:
return ret; return ret;
......
...@@ -307,7 +307,6 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec) ...@@ -307,7 +307,6 @@ static int wm8960_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -986,7 +986,6 @@ static int wm8961_probe(struct platform_device *pdev) ...@@ -986,7 +986,6 @@ static int wm8961_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, wm8961_dapm_widgets, snd_soc_dapm_new_controls(codec, wm8961_dapm_widgets,
ARRAY_SIZE(wm8961_dapm_widgets)); ARRAY_SIZE(wm8961_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);
return ret; return ret;
......
...@@ -338,8 +338,6 @@ static int wm8971_add_widgets(struct snd_soc_codec *codec) ...@@ -338,8 +338,6 @@ static int wm8971_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -276,7 +276,6 @@ static int wm8974_add_widgets(struct snd_soc_codec *codec) ...@@ -276,7 +276,6 @@ static int wm8974_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -790,7 +790,6 @@ static int wm8988_probe(struct platform_device *pdev) ...@@ -790,7 +790,6 @@ static int wm8988_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, wm8988_dapm_widgets, snd_soc_dapm_new_controls(codec, wm8988_dapm_widgets,
ARRAY_SIZE(wm8988_dapm_widgets)); ARRAY_SIZE(wm8988_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return ret; return ret;
......
...@@ -920,7 +920,6 @@ static int wm8990_add_widgets(struct snd_soc_codec *codec) ...@@ -920,7 +920,6 @@ static int wm8990_add_widgets(struct snd_soc_codec *codec)
/* set up the WM8990 audio map */ /* set up the WM8990 audio map */
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -1464,8 +1464,6 @@ static int wm8993_probe(struct platform_device *pdev) ...@@ -1464,8 +1464,6 @@ static int wm8993_probe(struct platform_device *pdev)
wm_hubs_add_analogue_routes(codec, wm8993->pdata.lineout1_diff, wm_hubs_add_analogue_routes(codec, wm8993->pdata.lineout1_diff,
wm8993->pdata.lineout2_diff); wm8993->pdata.lineout2_diff);
snd_soc_dapm_new_widgets(codec);
return ret; return ret;
err: err:
......
...@@ -1262,7 +1262,6 @@ static int wm9081_probe(struct platform_device *pdev) ...@@ -1262,7 +1262,6 @@ static int wm9081_probe(struct platform_device *pdev)
snd_soc_dapm_new_controls(codec, wm9081_dapm_widgets, snd_soc_dapm_new_controls(codec, wm9081_dapm_widgets,
ARRAY_SIZE(wm9081_dapm_widgets)); ARRAY_SIZE(wm9081_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths)); snd_soc_dapm_add_routes(codec, audio_paths, ARRAY_SIZE(audio_paths));
snd_soc_dapm_new_widgets(codec);
return ret; return ret;
......
...@@ -205,7 +205,6 @@ static int wm9705_add_widgets(struct snd_soc_codec *codec) ...@@ -205,7 +205,6 @@ static int wm9705_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_new_controls(codec, wm9705_dapm_widgets, snd_soc_dapm_new_controls(codec, wm9705_dapm_widgets,
ARRAY_SIZE(wm9705_dapm_widgets)); ARRAY_SIZE(wm9705_dapm_widgets));
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -436,7 +436,6 @@ static int wm9712_add_widgets(struct snd_soc_codec *codec) ...@@ -436,7 +436,6 @@ static int wm9712_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
...@@ -625,7 +625,6 @@ static int wm9713_add_widgets(struct snd_soc_codec *codec) ...@@ -625,7 +625,6 @@ static int wm9713_add_widgets(struct snd_soc_codec *codec)
snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map)); snd_soc_dapm_add_routes(codec, audio_map, ARRAY_SIZE(audio_map));
snd_soc_dapm_new_widgets(codec);
return 0; return 0;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册