[015/127] ASoC: use component probe/remove on wm8580
diff mbox

Message ID 874m6uee9g.wl%kuninori.morimoto.gx@renesas.com
State New
Headers show

Commit Message

Kuninori Morimoto Aug. 9, 2016, 4:59 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/wm8580.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

Patch
diff mbox

diff --git a/sound/soc/codecs/wm8580.c b/sound/soc/codecs/wm8580.c
index 2e69270..2a812a9 100644
--- a/sound/soc/codecs/wm8580.c
+++ b/sound/soc/codecs/wm8580.c
@@ -862,8 +862,9 @@  static struct snd_soc_dai_driver wm8580_dai[] = {
 	},
 };
 
-static int wm8580_probe(struct snd_soc_codec *codec)
+static int wm8580_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
 	int ret = 0;
 
@@ -890,21 +891,20 @@  err_regulator_get:
 }
 
 /* power down chip */
-static int wm8580_remove(struct snd_soc_codec *codec)
+static void wm8580_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8580_priv *wm8580 = snd_soc_codec_get_drvdata(codec);
 
 	regulator_bulk_disable(ARRAY_SIZE(wm8580->supplies), wm8580->supplies);
-
-	return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8580 = {
-	.probe =	wm8580_probe,
-	.remove =	wm8580_remove,
 	.set_bias_level = wm8580_set_bias_level,
 
 	.component_driver = {
+		.probe			= wm8580_probe,
+		.remove			= wm8580_remove,
 		.controls		= wm8580_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8580_snd_controls),
 		.dapm_widgets		= wm8580_dapm_widgets,