From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 064/127] ASoC: use component probe/remove on wm9713 Date: Tue, 9 Aug 2016 05:22:32 +0000 Message-ID: <8760rabk1r.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 ACC5B267515 for ; Tue, 9 Aug 2016 07:22:37 +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/wm9713.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm9713.c b/sound/soc/codecs/wm9713.c index 255a7c2..50b1156 100644 --- a/sound/soc/codecs/wm9713.c +++ b/sound/soc/codecs/wm9713.c @@ -1202,8 +1202,9 @@ static int wm9713_soc_resume(struct snd_soc_codec *codec) return ret; } -static int wm9713_soc_probe(struct snd_soc_codec *codec) +static int wm9713_soc_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); struct regmap *regmap; @@ -1226,23 +1227,23 @@ static int wm9713_soc_probe(struct snd_soc_codec *codec) return 0; } -static int wm9713_soc_remove(struct snd_soc_codec *codec) +static void wm9713_soc_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm9713_priv *wm9713 = snd_soc_codec_get_drvdata(codec); snd_soc_codec_exit_regmap(codec); snd_soc_free_ac97_codec(wm9713->ac97); - return 0; } static struct snd_soc_codec_driver soc_codec_dev_wm9713 = { - .probe = wm9713_soc_probe, - .remove = wm9713_soc_remove, .suspend = wm9713_soc_suspend, .resume = wm9713_soc_resume, .set_bias_level = wm9713_set_bias_level, .component_driver = { + .probe = wm9713_soc_probe, + .remove = wm9713_soc_remove, .controls = wm9713_snd_ac97_controls, .num_controls = ARRAY_SIZE(wm9713_snd_ac97_controls), .dapm_widgets = wm9713_dapm_widgets, -- 1.9.1