From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 066/127] ASoC: use component probe/remove on wm9705 Date: Tue, 9 Aug 2016 05:23:13 +0000 Message-ID: <8737mebk0m.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 78C00266995 for ; Tue, 9 Aug 2016 07:23:18 +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/wm9705.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/wm9705.c b/sound/soc/codecs/wm9705.c index c88492d..928b51d 100644 --- a/sound/soc/codecs/wm9705.c +++ b/sound/soc/codecs/wm9705.c @@ -328,8 +328,9 @@ static int wm9705_soc_resume(struct snd_soc_codec *codec) #define wm9705_soc_resume NULL #endif -static int wm9705_soc_probe(struct snd_soc_codec *codec) +static int wm9705_soc_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_ac97 *ac97; ac97 = snd_soc_new_ac97_codec(codec, WM9705_VENDOR_ID, @@ -344,17 +345,15 @@ static int wm9705_soc_probe(struct snd_soc_codec *codec) return 0; } -static int wm9705_soc_remove(struct snd_soc_codec *codec) +static void wm9705_soc_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_ac97 *ac97 = snd_soc_codec_get_drvdata(codec); snd_soc_free_ac97_codec(ac97); - return 0; } static struct snd_soc_codec_driver soc_codec_dev_wm9705 = { - .probe = wm9705_soc_probe, - .remove = wm9705_soc_remove, .suspend = wm9705_soc_suspend, .resume = wm9705_soc_resume, .read = ac97_read, @@ -365,6 +364,8 @@ static struct snd_soc_codec_driver soc_codec_dev_wm9705 = { .reg_cache_default = wm9705_reg, .component_driver = { + .probe = wm9705_soc_probe, + .remove = wm9705_soc_remove, .controls = wm9705_snd_ac97_controls, .num_controls = ARRAY_SIZE(wm9705_snd_ac97_controls), .dapm_widgets = wm9705_dapm_widgets, -- 1.9.1