[alsa-devel] [PATCH 054/127] ASoC: use component probe/remove on adau1373

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

diff --git a/sound/soc/codecs/adau1373.c b/sound/soc/codecs/adau1373.c
index 8fa9045..6056948 100644
--- a/sound/soc/codecs/adau1373.c
+++ b/sound/soc/codecs/adau1373.c
@@ -1348,8 +1348,9 @@ static bool adau1373_valid_micbias(enum adau1373_micbias_voltage micbias)
 	return false;
 }
 
-static int adau1373_probe(struct snd_soc_codec *codec)
+static int adau1373_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct adau1373 *adau1373 = snd_soc_codec_get_drvdata(codec);
 	struct adau1373_platform_data *pdata = codec->dev->platform_data;
 	bool lineout_differential = false;
@@ -1459,7 +1460,6 @@ static const struct regmap_config adau1373_regmap_config = {
 };
 
 static struct snd_soc_codec_driver adau1373_codec_driver = {
-	.probe =	adau1373_probe,
 	.resume =	adau1373_resume,
 	.set_bias_level = adau1373_set_bias_level,
 	.idle_bias_off = true,
@@ -1467,6 +1467,7 @@ static struct snd_soc_codec_driver adau1373_codec_driver = {
 	.set_pll = adau1373_set_pll,
 
 	.component_driver = {
+		.probe			= adau1373_probe,
 		.controls		= adau1373_controls,
 		.num_controls		= ARRAY_SIZE(adau1373_controls),
 		.dapm_widgets		= adau1373_dapm_widgets,
-- 
1.9.1



More information about the Alsa-devel mailing list