[alsa-devel] [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:16:40 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/ab8500-codec.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c
index 3056487..4e4ede3 100644
--- a/sound/soc/codecs/ab8500-codec.c
+++ b/sound/soc/codecs/ab8500-codec.c
@@ -2458,8 +2458,9 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np,
}
}
-static int ab8500_codec_probe(struct snd_soc_codec *codec)
+static int ab8500_codec_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
struct device *dev = codec->dev;
struct device_node *np = dev->of_node;
@@ -2524,8 +2525,8 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec)
}
static struct snd_soc_codec_driver ab8500_codec_driver = {
- .probe = ab8500_codec_probe,
.component_driver = {
+ .probe = ab8500_codec_probe,
.controls = ab8500_ctrls,
.num_controls = ARRAY_SIZE(ab8500_ctrls),
.dapm_widgets = ab8500_dapm_widgets,
--
1.9.1
More information about the Alsa-devel
mailing list