[alsa-devel] [PATCH 118/127] ASoC: use component probe/remove on max98357a
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Tue Aug 9 07:42:44 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/max98357a.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/sound/soc/codecs/max98357a.c b/sound/soc/codecs/max98357a.c
index 6a6b68a..b321424 100644
--- a/sound/soc/codecs/max98357a.c
+++ b/sound/soc/codecs/max98357a.c
@@ -59,8 +59,9 @@ static const struct snd_soc_dapm_route max98357a_dapm_routes[] = {
{"Speaker", NULL, "HiFi Playback"},
};
-static int max98357a_codec_probe(struct snd_soc_codec *codec)
+static int max98357a_codec_probe(struct snd_soc_component *component)
{
+ struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
struct gpio_desc *sdmode;
sdmode = devm_gpiod_get_optional(codec->dev, "sdmode", GPIOD_OUT_LOW);
@@ -73,8 +74,8 @@ static int max98357a_codec_probe(struct snd_soc_codec *codec)
}
static struct snd_soc_codec_driver max98357a_codec_driver = {
- .probe = max98357a_codec_probe,
.component_driver = {
+ .probe = max98357a_codec_probe,
.dapm_widgets = max98357a_dapm_widgets,
.num_dapm_widgets = ARRAY_SIZE(max98357a_dapm_widgets),
.dapm_routes = max98357a_dapm_routes,
--
1.9.1
More information about the Alsa-devel
mailing list