[alsa-devel] [PATCH 1/2] ASoC: cs4271: Convert to table based control init

Mark Brown broonie at kernel.org
Sun Aug 11 14:16:16 CEST 2013


From: Mark Brown <broonie at linaro.org>

Signed-off-by: Mark Brown <broonie at linaro.org>
---
 sound/soc/codecs/cs4271.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c
index 03036b3..65ad56c 100644
--- a/sound/soc/codecs/cs4271.c
+++ b/sound/soc/codecs/cs4271.c
@@ -576,8 +576,7 @@ static int cs4271_probe(struct snd_soc_codec *codec)
 				   CS4271_MODE2_MUTECAEQUB,
 				   CS4271_MODE2_MUTECAEQUB);
 
-	return snd_soc_add_codec_controls(codec, cs4271_snd_controls,
-		ARRAY_SIZE(cs4271_snd_controls));
+	return 0;
 }
 
 static int cs4271_remove(struct snd_soc_codec *codec)
@@ -596,6 +595,9 @@ static struct snd_soc_codec_driver soc_codec_dev_cs4271 = {
 	.remove			= cs4271_remove,
 	.suspend		= cs4271_soc_suspend,
 	.resume			= cs4271_soc_resume,
+
+	.controls		= cs4271_snd_controls,
+	.num_controls		= ARRAY_SIZE(cs4271_snd_controls),
 };
 
 #if defined(CONFIG_SPI_MASTER)
-- 
1.8.4.rc1



More information about the Alsa-devel mailing list