diff mbox

[121/127] ASoC: use component probe/remove on max98088

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

Commit Message

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

Patch

diff --git a/sound/soc/codecs/max98088.c b/sound/soc/codecs/max98088.c
index 72f7745..4e992c2 100644
--- a/sound/soc/codecs/max98088.c
+++ b/sound/soc/codecs/max98088.c
@@ -1628,8 +1628,9 @@  static void max98088_handle_pdata(struct snd_soc_codec *codec)
                max98088_handle_eq_pdata(codec);
 }
 
-static int max98088_probe(struct snd_soc_codec *codec)
+static int max98088_probe(struct snd_soc_component *component)
 {
+       struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
        struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
        struct max98088_cdata *cdata;
        int ret = 0;
@@ -1689,22 +1690,21 @@  err_access:
        return ret;
 }
 
-static int max98088_remove(struct snd_soc_codec *codec)
+static void max98088_remove(struct snd_soc_component *component)
 {
+       struct snd_soc_codec *codec = snd_soc_component_to_codec(component);
        struct max98088_priv *max98088 = snd_soc_codec_get_drvdata(codec);
 
        kfree(max98088->eq_texts);
-
-       return 0;
 }
 
 static struct snd_soc_codec_driver soc_codec_dev_max98088 = {
-	.probe   = max98088_probe,
-	.remove  = max98088_remove,
 	.set_bias_level = max98088_set_bias_level,
 	.suspend_bias_off = true,
 
 	.component_driver = {
+		.probe			= max98088_probe,
+		.remove			= max98088_remove,
 		.controls		= max98088_snd_controls,
 		.num_controls		= ARRAY_SIZE(max98088_snd_controls),
 		.dapm_widgets		= max98088_dapm_widgets,