From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 088/127] ASoC: use component probe/remove on wm5100 Date: Tue, 9 Aug 2016 05:30:49 +0000 Message-ID: <878tw6a53i.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 A2A0A2672A9 for ; Tue, 9 Aug 2016 07:30:54 +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/wm5100.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wm5100.c b/sound/soc/codecs/wm5100.c index 8cbdf17..cc6247e 100644 --- a/sound/soc/codecs/wm5100.c +++ b/sound/soc/codecs/wm5100.c @@ -2330,8 +2330,9 @@ static void wm5100_free_gpio(struct i2c_client *i2c) } #endif -static int wm5100_probe(struct snd_soc_codec *codec) +static int wm5100_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct i2c_client *i2c = to_i2c_client(codec->dev); struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec); @@ -2370,27 +2371,25 @@ err_gpio: return ret; } -static int wm5100_remove(struct snd_soc_codec *codec) +static void wm5100_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wm5100_priv *wm5100 = snd_soc_codec_get_drvdata(codec); if (wm5100->pdata.hp_pol) { gpio_free(wm5100->pdata.hp_pol); } - - return 0; } static struct snd_soc_codec_driver soc_codec_dev_wm5100 = { - .probe = wm5100_probe, - .remove = wm5100_remove, - .set_sysclk = wm5100_set_sysclk, .set_pll = wm5100_set_fll, .idle_bias_off = 1, .seq_notifier = wm5100_seq_notifier, .component_driver = { + .probe = wm5100_probe, + .remove = wm5100_remove, .controls = wm5100_snd_controls, .num_controls = ARRAY_SIZE(wm5100_snd_controls), .dapm_widgets = wm5100_dapm_widgets, -- 1.9.1