aboutsummaryrefslogtreecommitdiffstats
path: root/sound/soc/codecs/cs42l51.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2011-12-19 21:19:54 -0500
committerMark Brown <broonie@opensource.wolfsonmicro.com>2011-12-20 07:04:33 -0500
commit3f7cec0493eec1d0139a20716b1ce34815a446c3 (patch)
tree3840d55a4984d8d521d546401318868d38effccf /sound/soc/codecs/cs42l51.c
parentf4f8e4c32c5064b292303b270999a87fe11f4ba4 (diff)
ASoC: Convert cs42l51 to table based DAPM and control init
Signed-off-by: Axel Lin <axel.lin@gmail.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'sound/soc/codecs/cs42l51.c')
-rw-r--r--sound/soc/codecs/cs42l51.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/sound/soc/codecs/cs42l51.c b/sound/soc/codecs/cs42l51.c
index 528510b8e5de..ffce9f2a6643 100644
--- a/sound/soc/codecs/cs42l51.c
+++ b/sound/soc/codecs/cs42l51.c
@@ -511,7 +511,6 @@ static struct snd_soc_dai_driver cs42l51_dai = {
511static int cs42l51_probe(struct snd_soc_codec *codec) 511static int cs42l51_probe(struct snd_soc_codec *codec)
512{ 512{
513 struct cs42l51_private *cs42l51 = snd_soc_codec_get_drvdata(codec); 513 struct cs42l51_private *cs42l51 = snd_soc_codec_get_drvdata(codec);
514 struct snd_soc_dapm_context *dapm = &codec->dapm;
515 int ret, reg; 514 int ret, reg;
516 515
517 ret = cs42l51_fill_cache(codec); 516 ret = cs42l51_fill_cache(codec);
@@ -539,20 +538,20 @@ static int cs42l51_probe(struct snd_soc_codec *codec)
539 if (ret < 0) 538 if (ret < 0)
540 return ret; 539 return ret;
541 540
542 snd_soc_add_controls(codec, cs42l51_snd_controls,
543 ARRAY_SIZE(cs42l51_snd_controls));
544 snd_soc_dapm_new_controls(dapm, cs42l51_dapm_widgets,
545 ARRAY_SIZE(cs42l51_dapm_widgets));
546 snd_soc_dapm_add_routes(dapm, cs42l51_routes,
547 ARRAY_SIZE(cs42l51_routes));
548
549 return 0; 541 return 0;
550} 542}
551 543
552static struct snd_soc_codec_driver soc_codec_device_cs42l51 = { 544static struct snd_soc_codec_driver soc_codec_device_cs42l51 = {
553 .probe = cs42l51_probe, 545 .probe = cs42l51_probe,
554 .reg_cache_size = CS42L51_NUMREGS + 1, 546 .reg_cache_size = CS42L51_NUMREGS + 1,
555 .reg_word_size = sizeof(u8), 547 .reg_word_size = sizeof(u8),
548
549 .controls = cs42l51_snd_controls,
550 .num_controls = ARRAY_SIZE(cs42l51_snd_controls),
551 .dapm_widgets = cs42l51_dapm_widgets,
552 .num_dapm_widgets = ARRAY_SIZE(cs42l51_dapm_widgets),
553 .dapm_routes = cs42l51_routes,
554 .num_dapm_routes = ARRAY_SIZE(cs42l51_routes),
556}; 555};
557 556
558static int cs42l51_i2c_probe(struct i2c_client *i2c_client, 557static int cs42l51_i2c_probe(struct i2c_client *i2c_client,