aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/twl4030.c
diff options
context:
space:
mode:
authorPeter Ujfalusi <peter.ujfalusi@ti.com>2011-10-11 06:11:32 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-10-11 09:32:22 -0400
commitf7c93f018d21ed0d9218535497922a21066212dc (patch)
tree68508cd8303fe3cf4ee8818d4585f25ad2bcab23 /sound/soc/codecs/twl4030.c
parenta175fce01b963581e22b286f9a1f106581a29226 (diff)
ASoC: twl4030: Convert to table based init
Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/twl4030.c')
-rw-r--r--sound/soc/codecs/twl4030.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/sound/soc/codecs/twl4030.c b/sound/soc/codecs/twl4030.c
index 7c244cd0d53f..f798247ac1b2 100644
--- a/sound/soc/codecs/twl4030.c
+++ b/sound/soc/codecs/twl4030.c
@@ -1609,17 +1609,6 @@ static const struct snd_soc_dapm_route intercon[] = {
1609 1609
1610}; 1610};
1611 1611
1612static int twl4030_add_widgets(struct snd_soc_codec *codec)
1613{
1614 struct snd_soc_dapm_context *dapm = &codec->dapm;
1615
1616 snd_soc_dapm_new_controls(dapm, twl4030_dapm_widgets,
1617 ARRAY_SIZE(twl4030_dapm_widgets));
1618 snd_soc_dapm_add_routes(dapm, intercon, ARRAY_SIZE(intercon));
1619
1620 return 0;
1621}
1622
1623static int twl4030_set_bias_level(struct snd_soc_codec *codec, 1612static int twl4030_set_bias_level(struct snd_soc_codec *codec,
1624 enum snd_soc_bias_level level) 1613 enum snd_soc_bias_level level)
1625{ 1614{
@@ -2241,9 +2230,6 @@ static int twl4030_soc_probe(struct snd_soc_codec *codec)
2241 2230
2242 twl4030_init_chip(codec); 2231 twl4030_init_chip(codec);
2243 2232
2244 snd_soc_add_controls(codec, twl4030_snd_controls,
2245 ARRAY_SIZE(twl4030_snd_controls));
2246 twl4030_add_widgets(codec);
2247 return 0; 2233 return 0;
2248} 2234}
2249 2235
@@ -2269,6 +2255,13 @@ static struct snd_soc_codec_driver soc_codec_dev_twl4030 = {
2269 .reg_cache_size = sizeof(twl4030_reg), 2255 .reg_cache_size = sizeof(twl4030_reg),
2270 .reg_word_size = sizeof(u8), 2256 .reg_word_size = sizeof(u8),
2271 .reg_cache_default = twl4030_reg, 2257 .reg_cache_default = twl4030_reg,
2258
2259 .controls = twl4030_snd_controls,
2260 .num_controls = ARRAY_SIZE(twl4030_snd_controls),
2261 .dapm_widgets = twl4030_dapm_widgets,
2262 .num_dapm_widgets = ARRAY_SIZE(twl4030_dapm_widgets),
2263 .dapm_routes = intercon,
2264 .num_dapm_routes = ARRAY_SIZE(intercon),
2272}; 2265};
2273 2266
2274static int __devinit twl4030_codec_probe(struct platform_device *pdev) 2267static int __devinit twl4030_codec_probe(struct platform_device *pdev)