[alsa-devel] [PATCH 043/127] ASoC: use component probe/remove on ak4642

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

diff --git a/sound/soc/codecs/ak4642.c b/sound/soc/codecs/ak4642.c
index 2609f95..92924b5 100644
--- a/sound/soc/codecs/ak4642.c
+++ b/sound/soc/codecs/ak4642.c
@@ -540,8 +540,9 @@ static int ak4642_resume(struct snd_soc_codec *codec)
 	regcache_sync(regmap);
 	return 0;
 }
-static int ak4642_probe(struct snd_soc_codec *codec)
+static int ak4642_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct ak4642_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	if (priv->mcko)
@@ -551,11 +552,11 @@ static int ak4642_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_ak4642 = {
-	.probe			= ak4642_probe,
 	.suspend		= ak4642_suspend,
 	.resume			= ak4642_resume,
 	.set_bias_level		= ak4642_set_bias_level,
 	.component_driver = {
+		.probe			= ak4642_probe,
 		.controls		= ak4642_snd_controls,
 		.num_controls		= ARRAY_SIZE(ak4642_snd_controls),
 		.dapm_widgets		= ak4642_dapm_widgets,
-- 
1.9.1



More information about the Alsa-devel mailing list