From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 106/127] ASoC: use component probe/remove on rt5645 Date: Tue, 9 Aug 2016 05:38:31 +0000 Message-ID: <87inva8q69.wl%kuninori.morimoto.gx@renesas.com> References: <87popieek9.wl%kuninori.morimoto.gx@renesas.com> Mime-Version: 1.0 (generated by SEMI-EPG 1.14.7 - "Harue") Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: Received: from relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id 349F72669C6 for ; Tue, 9 Aug 2016 07:38:35 +0200 (CEST) In-Reply-To: <87popieek9.wl%kuninori.morimoto.gx@renesas.com> List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: alsa-devel-bounces@alsa-project.org Sender: alsa-devel-bounces@alsa-project.org To: Mark Brown Cc: Linux-ALSA , Simon , Liam Girdwood List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto 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 --- sound/soc/codecs/rt5645.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/rt5645.c b/sound/soc/codecs/rt5645.c index 10c2a56..8ae375b 100644 --- a/sound/soc/codecs/rt5645.c +++ b/sound/soc/codecs/rt5645.c @@ -3352,8 +3352,9 @@ static void rt5645_btn_check_callback(unsigned long data) &rt5645->jack_detect_work, msecs_to_jiffies(5)); } -static int rt5645_probe(struct snd_soc_codec *codec) +static int rt5645_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct rt5645_priv *rt5645 = snd_soc_codec_get_drvdata(codec); @@ -3393,10 +3394,11 @@ static int rt5645_probe(struct snd_soc_codec *codec) return 0; } -static int rt5645_remove(struct snd_soc_codec *codec) +static void rt5645_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); + rt5645_reset(codec); - return 0; } #ifdef CONFIG_PM @@ -3478,13 +3480,13 @@ static struct snd_soc_dai_driver rt5645_dai[] = { }; static struct snd_soc_codec_driver soc_codec_dev_rt5645 = { - .probe = rt5645_probe, - .remove = rt5645_remove, .suspend = rt5645_suspend, .resume = rt5645_resume, .set_bias_level = rt5645_set_bias_level, .idle_bias_off = true, .component_driver = { + .probe = rt5645_probe, + .remove = rt5645_remove, .controls = rt5645_snd_controls, .num_controls = ARRAY_SIZE(rt5645_snd_controls), .dapm_widgets = rt5645_dapm_widgets, -- 1.9.1