diff options
author | Lars-Peter Clausen <lars@metafoo.de> | 2014-11-05 10:46:32 +0100 |
---|---|---|
committer | Mark Brown <broonie@kernel.org> | 2014-11-05 14:48:05 +0000 |
commit | e3f1ff318e78990977dae91f7f17f02e9af38e7d (patch) | |
tree | dc897c8b52da4390507d3e4fff62208b4b5f2c9d /sound | |
parent | f114040e3ea6e07372334ade75d1ee0775c355e1 (diff) | |
download | linux-e3f1ff318e78990977dae91f7f17f02e9af38e7d.tar.gz linux-e3f1ff318e78990977dae91f7f17f02e9af38e7d.tar.bz2 linux-e3f1ff318e78990977dae91f7f17f02e9af38e7d.zip |
ASoC: tas2552: Use table based DAPM setup
Makes the code a bit cleaner and shorter.
Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
-rw-r--r-- | sound/soc/codecs/tas2552.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c index f039dc825971..b505212019e2 100644 --- a/sound/soc/codecs/tas2552.c +++ b/sound/soc/codecs/tas2552.c @@ -345,7 +345,6 @@ static const struct reg_default tas2552_init_regs[] = { static int tas2552_codec_probe(struct snd_soc_codec *codec) { struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec); - struct snd_soc_dapm_context *dapm = &codec->dapm; int ret; tas2552->codec = codec; @@ -390,11 +389,6 @@ static int tas2552_codec_probe(struct snd_soc_codec *codec) snd_soc_write(codec, TAS2552_CFG_2, TAS2552_BOOST_EN | TAS2552_APT_EN | TAS2552_LIM_EN); - snd_soc_dapm_new_controls(dapm, tas2552_dapm_widgets, - ARRAY_SIZE(tas2552_dapm_widgets)); - snd_soc_dapm_add_routes(dapm, tas2552_audio_map, - ARRAY_SIZE(tas2552_audio_map)); - return 0; patch_fail: @@ -462,6 +456,10 @@ static struct snd_soc_codec_driver soc_codec_dev_tas2552 = { .resume = tas2552_resume, .controls = tas2552_snd_controls, .num_controls = ARRAY_SIZE(tas2552_snd_controls), + .dapm_widgets = tas2552_dapm_widgets, + .num_dapm_widgets = ARRAY_SIZE(tas2552_dapm_widgets), + .dapm_routes = tas2552_audio_map, + .num_dapm_routes = ARRAY_SIZE(tas2552_audio_map), }; static const struct regmap_config tas2552_regmap_config = { |