diff mbox

[005/127] ASoC: use component probe/remove on wm8974

Message ID 87invaeegd.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State New, archived
Headers show

Commit Message

Kuninori Morimoto Aug. 9, 2016, 4:55 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@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@renesas.com>
---
 sound/soc/codecs/wm8974.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/codecs/wm8974.c b/sound/soc/codecs/wm8974.c
index fbda6e3..3da4e44 100644
--- a/sound/soc/codecs/wm8974.c
+++ b/sound/soc/codecs/wm8974.c
@@ -663,8 +663,9 @@  static const struct regmap_config wm8974_regmap = {
 	.cache_type = REGCACHE_FLAT,
 };
 
-static int wm8974_probe(struct snd_soc_codec *codec)
+static int wm8974_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	int ret = 0;
 
 	ret = wm8974_reset(codec);
@@ -677,11 +678,11 @@  static int wm8974_probe(struct snd_soc_codec *codec)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8974 = {
-	.probe = 	wm8974_probe,
 	.set_bias_level = wm8974_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= wm8974_probe,
 		.controls		= wm8974_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8974_snd_controls),
 		.dapm_widgets		= wm8974_dapm_widgets,