[alsa-devel] [PATCH 023/127] ASoC: use component probe/remove on sti-sas

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:02:40 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/sti-sas.c | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/sound/soc/codecs/sti-sas.c b/sound/soc/codecs/sti-sas.c
index 7b31ee9..81b8ade 100644
--- a/sound/soc/codecs/sti-sas.c
+++ b/sound/soc/codecs/sti-sas.c
@@ -516,8 +516,9 @@ static int sti_sas_resume(struct snd_soc_codec *codec)
 #define sti_sas_resume NULL
 #endif
 
-static int sti_sas_codec_probe(struct snd_soc_codec *codec)
+static int sti_sas_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct sti_sas_data *drvdata = dev_get_drvdata(codec->dev);
 	int ret;
 
@@ -527,8 +528,10 @@ static int sti_sas_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver sti_sas_driver = {
-	.probe = sti_sas_codec_probe,
 	.resume = sti_sas_resume,
+	.component_driver = {
+		.probe			= sti_sas_codec_probe,
+	},
 };
 
 static const struct of_device_id sti_sas_dev_match[] = {
-- 
1.9.1



More information about the Alsa-devel mailing list