[001/127] ASoC: use component probe/remove on tas5086
diff mbox

Message ID 87oa52eej0.wl%kuninori.morimoto.gx@renesas.com
State New
Headers show

Commit Message

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

Patch
diff mbox

diff --git a/sound/soc/codecs/tas5086.c b/sound/soc/codecs/tas5086.c
index c297b9f..ad2403d 100644
--- a/sound/soc/codecs/tas5086.c
+++ b/sound/soc/codecs/tas5086.c
@@ -823,8 +823,9 @@  static const struct of_device_id tas5086_dt_ids[] = {
 MODULE_DEVICE_TABLE(of, tas5086_dt_ids);
 #endif
 
-static int tas5086_probe(struct snd_soc_codec *codec)
+static int tas5086_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
 	int i, ret;
 
@@ -872,8 +873,9 @@  exit_disable_regulators:
 	return ret;
 }
 
-static int tas5086_remove(struct snd_soc_codec *codec)
+static void tas5086_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas5086_private *priv = snd_soc_codec_get_drvdata(codec);
 
 	if (gpio_is_valid(priv->gpio_nreset))
@@ -881,16 +883,14 @@  static int tas5086_remove(struct snd_soc_codec *codec)
 		gpio_set_value(priv->gpio_nreset, 0);
 
 	regulator_bulk_disable(ARRAY_SIZE(priv->supplies), priv->supplies);
-
-	return 0;
 };
 
 static struct snd_soc_codec_driver soc_codec_dev_tas5086 = {
-	.probe			= tas5086_probe,
-	.remove			= tas5086_remove,
 	.suspend		= tas5086_soc_suspend,
 	.resume			= tas5086_soc_resume,
 	.component_driver = {
+		.probe			= tas5086_probe,
+		.remove			= tas5086_remove,
 		.controls		= tas5086_controls,
 		.num_controls		= ARRAY_SIZE(tas5086_controls),
 		.dapm_widgets		= tas5086_dapm_widgets,