[alsa-devel] [PATCH 024/127] ASoC: use component probe/remove on sta350
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:03:11 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/sta350.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/sta350.c b/sound/soc/codecs/sta350.c
index 9644c20..c07c92e 100644
--- a/sound/soc/codecs/sta350.c
+++ b/sound/soc/codecs/sta350.c
@@ -911,8 +911,9 @@ static struct snd_soc_dai_driver sta350_dai = {
.ops = &sta350_dai_ops,
};
-static int sta350_probe(struct snd_soc_codec *codec)
+static int sta350_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec);
struct sta350_platform_data *pdata = sta350->pdata;
int i, ret = 0, thermal = 0;
@@ -1043,21 +1044,20 @@ static int sta350_probe(struct snd_soc_codec *codec)
return 0;
}
-static int sta350_remove(struct snd_soc_codec *codec)
+static void sta350_remove(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct sta350_priv *sta350 = snd_soc_codec_get_drvdata(codec);
regulator_bulk_disable(ARRAY_SIZE(sta350->supplies), sta350->supplies);
-
- return 0;
}
static const struct snd_soc_codec_driver sta350_codec = {
- .probe = sta350_probe,
- .remove = sta350_remove,
.set_bias_level = sta350_set_bias_level,
.suspend_bias_off = true,
.component_driver = {
+ .probe = sta350_probe,
+ .remove = sta350_remove,
.controls = sta350_snd_controls,
.num_controls = ARRAY_SIZE(sta350_snd_controls),
.dapm_widgets = sta350_dapm_widgets,
--
1.9.1
More information about the Alsa-devel
mailing list