[alsa-devel] [PATCH 101/127] ASoC: use component probe/remove on sn95031
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:36:03 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/sn95031.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/sn95031.c b/sound/soc/codecs/sn95031.c
index eae54c3..d212967 100644
--- a/sound/soc/codecs/sn95031.c
+++ b/sound/soc/codecs/sn95031.c
@@ -834,8 +834,10 @@ void sn95031_jack_detection(struct snd_soc_codec *codec,
EXPORT_SYMBOL_GPL(sn95031_jack_detection);
/* codec registration */
-static int sn95031_codec_probe(struct snd_soc_codec *codec)
+static int sn95031_codec_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
pr_debug("codec_probe called\n");
/* PCM interface config
@@ -884,11 +886,11 @@ static int sn95031_codec_probe(struct snd_soc_codec *codec)
}
static struct snd_soc_codec_driver sn95031_codec = {
- .probe = sn95031_codec_probe,
.set_bias_level = sn95031_set_vaud_bias,
.idle_bias_off = true,
.component_driver = {
+ .probe = sn95031_codec_probe,
.controls = sn95031_snd_controls,
.num_controls = ARRAY_SIZE(sn95031_snd_controls),
.dapm_widgets = sn95031_dapm_widgets,
--
1.9.1
More information about the Alsa-devel
mailing list