summaryrefslogtreecommitdiff
path: root/sound/soc
diff options
context:
space:
mode:
authorLars-Peter Clausen <lars@metafoo.de>2014-10-20 12:56:29 +0400
committerMark Brown <broonie@kernel.org>2014-10-22 14:28:04 +0400
commit4caab4194a99e58c08c70e7df846b9bda948f353 (patch)
tree6e0ab776278386a65011c23b3a032d7f13d19d10 /sound/soc
parent9313484238ca49fe5c7513dfcb36aaddcea8c298 (diff)
downloadlinux-4caab4194a99e58c08c70e7df846b9bda948f353.tar.xz
ASoC: ak4535: Use table based setup for controls
Makes the code slightly shorter and cleaner. Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound/soc')
-rw-r--r--sound/soc/codecs/ak4535.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/sound/soc/codecs/ak4535.c b/sound/soc/codecs/ak4535.c
index eced46d7d6cb..9130d916f2f4 100644
--- a/sound/soc/codecs/ak4535.c
+++ b/sound/soc/codecs/ak4535.c
@@ -379,13 +379,6 @@ static int ak4535_resume(struct snd_soc_codec *codec)
return 0;
}
-static int ak4535_probe(struct snd_soc_codec *codec)
-{
- snd_soc_add_codec_controls(codec, ak4535_snd_controls,
- ARRAY_SIZE(ak4535_snd_controls));
- return 0;
-}
-
static const struct regmap_config ak4535_regmap = {
.reg_bits = 8,
.val_bits = 8,
@@ -399,11 +392,12 @@ static const struct regmap_config ak4535_regmap = {
};
static struct snd_soc_codec_driver soc_codec_dev_ak4535 = {
- .probe = ak4535_probe,
.resume = ak4535_resume,
.set_bias_level = ak4535_set_bias_level,
.suspend_bias_off = true,
+ .controls = ak4535_snd_controls,
+ .num_controls = ARRAY_SIZE(ak4535_snd_controls),
.dapm_widgets = ak4535_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(ak4535_dapm_widgets),
.dapm_routes = ak4535_audio_map,