From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 045/127] ASoC: use component probe/remove on adau1701 Date: Tue, 9 Aug 2016 05:14:57 +0000 Message-ID: <87wpjqbkee.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 relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 8BCA32667F2 for ; Tue, 9 Aug 2016 07:15:03 +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/adau1701.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/adau1701.c b/sound/soc/codecs/adau1701.c index 3bad1bc..f45c959 100644 --- a/sound/soc/codecs/adau1701.c +++ b/sound/soc/codecs/adau1701.c @@ -664,10 +664,11 @@ static const struct of_device_id adau1701_dt_ids[] = { MODULE_DEVICE_TABLE(of, adau1701_dt_ids); #endif -static int adau1701_probe(struct snd_soc_codec *codec) +static int adau1701_probe(struct snd_soc_component *component) { int i, ret; unsigned int val; + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); ret = sigmadsp_attach(adau1701->sigmadsp, &codec->component); @@ -715,16 +716,15 @@ exit_regulators_disable: return ret; } -static int adau1701_remove(struct snd_soc_codec *codec) +static void adau1701_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct adau1701 *adau1701 = snd_soc_codec_get_drvdata(codec); if (gpio_is_valid(adau1701->gpio_nreset)) gpio_set_value_cansleep(adau1701->gpio_nreset, 0); regulator_bulk_disable(ARRAY_SIZE(adau1701->supplies), adau1701->supplies); - - return 0; } #ifdef CONFIG_PM @@ -758,14 +758,14 @@ static int adau1701_resume(struct snd_soc_codec *codec) #endif /* CONFIG_PM */ static struct snd_soc_codec_driver adau1701_codec_drv = { - .probe = adau1701_probe, - .remove = adau1701_remove, .resume = adau1701_resume, .suspend = adau1701_suspend, .set_bias_level = adau1701_set_bias_level, .idle_bias_off = true, .component_driver = { + .probe = adau1701_probe, + .remove = adau1701_remove, .controls = adau1701_controls, .num_controls = ARRAY_SIZE(adau1701_controls), .dapm_widgets = adau1701_dapm_widgets, -- 1.9.1