From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 111/127] ASoC: use component probe/remove on nau8825 Date: Tue, 9 Aug 2016 05:40:20 +0000 Message-ID: <87bn128q37.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 relmlie4.idc.renesas.com (relmlor1.renesas.com [210.160.252.171]) by alsa0.perex.cz (Postfix) with ESMTP id CB2E226792E for ; Tue, 9 Aug 2016 07:40:24 +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/nau8825.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/nau8825.c b/sound/soc/codecs/nau8825.c index 822791eb..f02a371 100644 --- a/sound/soc/codecs/nau8825.c +++ b/sound/soc/codecs/nau8825.c @@ -1832,8 +1832,9 @@ static const struct regmap_config nau8825_regmap_config = { .num_reg_defaults = ARRAY_SIZE(nau8825_reg_defaults), }; -static int nau8825_codec_probe(struct snd_soc_codec *codec) +static int nau8825_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); @@ -1842,14 +1843,13 @@ static int nau8825_codec_probe(struct snd_soc_codec *codec) return 0; } -static int nau8825_codec_remove(struct snd_soc_codec *codec) +static void nau8825_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct nau8825 *nau8825 = snd_soc_codec_get_drvdata(codec); /* Cancel and reset cross tak suppresstion detection funciton */ nau8825_xtalk_cancel(nau8825); - - return 0; } /** @@ -2261,8 +2261,6 @@ static int __maybe_unused nau8825_resume(struct snd_soc_codec *codec) } static struct snd_soc_codec_driver nau8825_codec_driver = { - .probe = nau8825_codec_probe, - .remove = nau8825_codec_remove, .set_sysclk = nau8825_set_sysclk, .set_pll = nau8825_set_pll, .set_bias_level = nau8825_set_bias_level, @@ -2271,6 +2269,8 @@ static struct snd_soc_codec_driver nau8825_codec_driver = { .resume = nau8825_resume, .component_driver = { + .probe = nau8825_codec_probe, + .remove = nau8825_codec_remove, .controls = nau8825_controls, .num_controls = ARRAY_SIZE(nau8825_controls), .dapm_widgets = nau8825_dapm_widgets, -- 1.9.1