[alsa-devel] [PATCH 048/127] ASoC: use component probe/remove on atmel-pdmic

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:15:59 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/atmel/atmel-pdmic.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/sound/soc/atmel/atmel-pdmic.c b/sound/soc/atmel/atmel-pdmic.c
index 2a3a41f..60cb267 100644
--- a/sound/soc/atmel/atmel-pdmic.c
+++ b/sound/soc/atmel/atmel-pdmic.c
@@ -344,8 +344,9 @@ SOC_SINGLE("High Pass Filter Switch", PDMIC_DSPR0,
 SOC_SINGLE("SINCC Filter Switch", PDMIC_DSPR0, PDMIC_DSPR0_SINBYP_SHIFT, 1, 1),
 };
 
-static int atmel_pdmic_codec_probe(struct snd_soc_codec *codec)
+static int atmel_pdmic_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct snd_soc_card *card = snd_soc_codec_get_drvdata(codec);
 	struct atmel_pdmic *dd = snd_soc_card_get_drvdata(card);
 
@@ -356,8 +357,8 @@ static int atmel_pdmic_codec_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_pdmic = {
-	.probe		= atmel_pdmic_codec_probe,
 	.component_driver = {
+		.probe			= atmel_pdmic_codec_probe,
 		.controls		= atmel_pdmic_snd_controls,
 		.num_controls		= ARRAY_SIZE(atmel_pdmic_snd_controls),
 	},
-- 
1.9.1



More information about the Alsa-devel mailing list