From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 019/127] ASoC: use component probe/remove on tlv320aic31xx Date: Tue, 9 Aug 2016 05:00:54 +0000 Message-ID: <87y446czma.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 0F9EF266840 for ; Tue, 9 Aug 2016 07:00:59 +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/tlv320aic31xx.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/tlv320aic31xx.c b/sound/soc/codecs/tlv320aic31xx.c index e46fb47..ea2f986 100644 --- a/sound/soc/codecs/tlv320aic31xx.c +++ b/sound/soc/codecs/tlv320aic31xx.c @@ -1058,9 +1058,10 @@ static int aic31xx_set_bias_level(struct snd_soc_codec *codec, return 0; } -static int aic31xx_codec_probe(struct snd_soc_codec *codec) +static int aic31xx_codec_probe(struct snd_soc_component *component) { int ret = 0; + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec); int i; @@ -1096,25 +1097,24 @@ static int aic31xx_codec_probe(struct snd_soc_codec *codec) return ret; } -static int aic31xx_codec_remove(struct snd_soc_codec *codec) +static void aic31xx_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct aic31xx_priv *aic31xx = snd_soc_codec_get_drvdata(codec); int i; for (i = 0; i < ARRAY_SIZE(aic31xx->supplies); i++) regulator_unregister_notifier(aic31xx->supplies[i].consumer, &aic31xx->disable_nb[i].nb); - - return 0; } static struct snd_soc_codec_driver soc_codec_driver_aic31xx = { - .probe = aic31xx_codec_probe, - .remove = aic31xx_codec_remove, .set_bias_level = aic31xx_set_bias_level, .suspend_bias_off = true, .component_driver = { + .probe = aic31xx_codec_probe, + .remove = aic31xx_codec_remove, .controls = aic31xx_snd_controls, .num_controls = ARRAY_SIZE(aic31xx_snd_controls), .dapm_widgets = aic31xx_dapm_widgets, -- 1.9.1