[022/127] ASoC: use component probe/remove on tas2552
diff mbox

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

Commit Message

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

Patch
diff mbox

diff --git a/sound/soc/codecs/tas2552.c b/sound/soc/codecs/tas2552.c
index baf455e..1739183 100644
--- a/sound/soc/codecs/tas2552.c
+++ b/sound/soc/codecs/tas2552.c
@@ -567,8 +567,9 @@  static const struct snd_kcontrol_new tas2552_snd_controls[] = {
 	SOC_ENUM("DIN source", tas2552_din_source_enum),
 };
 
-static int tas2552_codec_probe(struct snd_soc_codec *codec)
+static int tas2552_codec_probe(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec);
 	int ret;
 
@@ -614,15 +615,14 @@  probe_fail:
 	return -EIO;
 }
 
-static int tas2552_codec_remove(struct snd_soc_codec *codec)
+static void tas2552_codec_remove(struct snd_soc_component *component)
 {
+	struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
 	struct tas2552_data *tas2552 = snd_soc_codec_get_drvdata(codec);
 
 	pm_runtime_put(codec->dev);
 
 	gpiod_set_value(tas2552->enable_gpio, 0);
-
-	return 0;
 };
 
 #ifdef CONFIG_PM
@@ -661,13 +661,13 @@  static int tas2552_resume(struct snd_soc_codec *codec)
 #endif
 
 static struct snd_soc_codec_driver soc_codec_dev_tas2552 = {
-	.probe = tas2552_codec_probe,
-	.remove = tas2552_codec_remove,
 	.suspend =	tas2552_suspend,
 	.resume = tas2552_resume,
 	.ignore_pmdown_time = true,
 
 	.component_driver = {
+		.probe			= tas2552_codec_probe,
+		.remove			= tas2552_codec_remove,
 		.controls		= tas2552_snd_controls,
 		.num_controls		= ARRAY_SIZE(tas2552_snd_controls),
 		.dapm_widgets		= tas2552_dapm_widgets,