diff mbox

[069/127] ASoC: use component probe/remove on wm8998

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

Commit Message

Kuninori Morimoto Aug. 9, 2016, 5:24 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/wm8998.c | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
diff mbox

Patch

diff --git a/sound/soc/codecs/wm8998.c b/sound/soc/codecs/wm8998.c
index 315b23b..657b593 100644
--- a/sound/soc/codecs/wm8998.c
+++ b/sound/soc/codecs/wm8998.c
@@ -1304,8 +1304,9 @@  static int wm8998_set_fll(struct snd_soc_codec *codec, int fll_id, int source,
 	}
 }
 
-static int wm8998_codec_probe(struct snd_soc_codec *codec)
+static int wm8998_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
 	struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec);
 
@@ -1319,15 +1320,14 @@  static int wm8998_codec_probe(struct snd_soc_codec *codec)
 	return 0;
 }
 
-static int wm8998_codec_remove(struct snd_soc_codec *codec)
+static void wm8998_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct wm8998_priv *priv = snd_soc_codec_get_drvdata(codec);
 
 	priv->core.arizona->dapm = NULL;
 
 	arizona_free_spk(codec);
-
-	return 0;
 }
 
 #define WM8998_DIG_VU 0x0200
@@ -1352,8 +1352,6 @@  static struct regmap *wm8998_get_regmap(struct device *dev)
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_wm8998 = {
-	.probe = wm8998_codec_probe,
-	.remove = wm8998_codec_remove,
 	.get_regmap = wm8998_get_regmap,
 
 	.idle_bias_off = true,
@@ -1362,6 +1360,8 @@  static struct snd_soc_codec_driver soc_codec_dev_wm8998 = {
 	.set_pll = wm8998_set_fll,
 
 	.component_driver = {
+		.probe			= wm8998_codec_probe,
+		.remove			= wm8998_codec_remove,
 		.controls		= wm8998_snd_controls,
 		.num_controls		= ARRAY_SIZE(wm8998_snd_controls),
 		.dapm_widgets		= wm8998_dapm_widgets,