[alsa-devel] [PATCH 062/127] ASoC: use component probe/remove on da7210

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:21:54 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/da7210.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/sound/soc/codecs/da7210.c b/sound/soc/codecs/da7210.c
index 17053df..e8bc0d6 100644
--- a/sound/soc/codecs/da7210.c
+++ b/sound/soc/codecs/da7210.c
@@ -1064,8 +1064,9 @@ static struct snd_soc_dai_driver da7210_dai = {
 	.symmetric_rates = 1,
 };
 
-static int da7210_probe(struct snd_soc_codec *codec)
+static int da7210_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct da7210_priv *da7210 = snd_soc_codec_get_drvdata(codec);
 
 	dev_info(codec->dev, "DA7210 Audio Codec %s\n", DA7210_VERSION);
@@ -1165,9 +1166,8 @@ static int da7210_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_da7210 = {
-	.probe			= da7210_probe,
-
 	.component_driver = {
+		.probe			= da7210_probe,
 		.controls		= da7210_snd_controls,
 		.num_controls		= ARRAY_SIZE(da7210_snd_controls),
 		.dapm_widgets		= da7210_dapm_widgets,
-- 
1.9.1



More information about the Alsa-devel mailing list