[alsa-devel] [PATCH 020/127] ASoC: use component probe/remove on tlv320aic23

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:01:17 CEST 2016


From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>

codec driver and component driver has duplicated .probe/.remove
functions, and codec side is just relayed it. This was quick-hack,
but no longer needed.
This patch uses component .probe/.remove

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
 sound/soc/codecs/tlv320aic23.c | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/tlv320aic23.c b/sound/soc/codecs/tlv320aic23.c
index 410cae0..69e7e80 100644
--- a/sound/soc/codecs/tlv320aic23.c
+++ b/sound/soc/codecs/tlv320aic23.c
@@ -548,8 +548,10 @@ static int tlv320aic23_resume(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
+static int tlv320aic23_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
 	/* Reset codec */
 	snd_soc_write(codec, TLV320AIC23_RESET, 0);
 
@@ -578,12 +580,12 @@ static int tlv320aic23_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_tlv320aic23 = {
-	.probe = tlv320aic23_codec_probe,
 	.resume = tlv320aic23_resume,
 	.set_bias_level = tlv320aic23_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= tlv320aic23_codec_probe,
 		.controls		= tlv320aic23_snd_controls,
 		.num_controls		= ARRAY_SIZE(tlv320aic23_snd_controls),
 		.dapm_widgets		= tlv320aic23_dapm_widgets,
-- 
1.9.1



More information about the Alsa-devel mailing list