[alsa-devel] [PATCH 018/127] ASoC: use component probe/remove on tlv320aic3x
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:00:28 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/tlv320aic3x.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/sound/soc/codecs/tlv320aic3x.c b/sound/soc/codecs/tlv320aic3x.c
index 5a8d96e..502ce9f 100644
--- a/sound/soc/codecs/tlv320aic3x.c
+++ b/sound/soc/codecs/tlv320aic3x.c
@@ -1569,8 +1569,9 @@ static bool aic3x_is_shared_reset(struct aic3x_priv *aic3x)
return false;
}
-static int aic3x_probe(struct snd_soc_codec *codec)
+static int aic3x_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
int ret, i;
@@ -1652,8 +1653,9 @@ err_notif:
return ret;
}
-static int aic3x_remove(struct snd_soc_codec *codec)
+static void aic3x_remove(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct aic3x_priv *aic3x = snd_soc_codec_get_drvdata(codec);
int i;
@@ -1661,16 +1663,14 @@ static int aic3x_remove(struct snd_soc_codec *codec)
for (i = 0; i < ARRAY_SIZE(aic3x->supplies); i++)
regulator_unregister_notifier(aic3x->supplies[i].consumer,
&aic3x->disable_nb[i].nb);
-
- return 0;
}
static struct snd_soc_codec_driver soc_codec_dev_aic3x = {
.set_bias_level = aic3x_set_bias_level,
.idle_bias_off = true,
- .probe = aic3x_probe,
- .remove = aic3x_remove,
.component_driver = {
+ .probe = aic3x_probe,
+ .remove = aic3x_remove,
.controls = aic3x_snd_controls,
.num_controls = ARRAY_SIZE(aic3x_snd_controls),
.dapm_widgets = aic3x_dapm_widgets,
--
1.9.1
More information about the Alsa-devel
mailing list