[alsa-devel] [PATCH 112/127] ASoC: use component probe/remove on ml26124
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:40:39 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/ml26124.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ml26124.c b/sound/soc/codecs/ml26124.c
index 69e5e18..ba68349 100644
--- a/sound/soc/codecs/ml26124.c
+++ b/sound/soc/codecs/ml26124.c
@@ -528,8 +528,10 @@ static struct snd_soc_dai_driver ml26124_dai = {
.symmetric_rates = 1,
};
-static int ml26124_probe(struct snd_soc_codec *codec)
+static int ml26124_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
+
/* Software Reset */
snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 1);
snd_soc_update_bits(codec, ML26124_SW_RST, 0x01, 0);
@@ -538,10 +540,10 @@ static int ml26124_probe(struct snd_soc_codec *codec)
}
static struct snd_soc_codec_driver soc_codec_dev_ml26124 = {
- .probe = ml26124_probe,
.set_bias_level = ml26124_set_bias_level,
.suspend_bias_off = true,
.component_driver = {
+ .probe = ml26124_probe,
.controls = ml26124_snd_controls,
.num_controls = ARRAY_SIZE(ml26124_snd_controls),
.dapm_widgets = ml26124_dapm_widgets,
--
1.9.1
More information about the Alsa-devel
mailing list