From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 092/127] ASoC: use component probe/remove on wl1273 Date: Tue, 9 Aug 2016 05:32:35 +0000 Message-ID: <8737mea50l.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 29F37267783 for ; Tue, 9 Aug 2016 07:32:39 +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/wl1273.c | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/sound/soc/codecs/wl1273.c b/sound/soc/codecs/wl1273.c index fcffb6e..d5005f8 100644 --- a/sound/soc/codecs/wl1273.c +++ b/sound/soc/codecs/wl1273.c @@ -446,8 +446,9 @@ int wl1273_get_format(struct snd_soc_codec *codec, unsigned int *fmt) } EXPORT_SYMBOL_GPL(wl1273_get_format); -static int wl1273_probe(struct snd_soc_codec *codec) +static int wl1273_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wl1273_core **core = codec->dev->platform_data; struct wl1273_priv *wl1273; @@ -470,21 +471,19 @@ static int wl1273_probe(struct snd_soc_codec *codec) return 0; } -static int wl1273_remove(struct snd_soc_codec *codec) +static void wl1273_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct wl1273_priv *wl1273 = snd_soc_codec_get_drvdata(codec); dev_dbg(codec->dev, "%s\n", __func__); kfree(wl1273); - - return 0; } static struct snd_soc_codec_driver soc_codec_dev_wl1273 = { - .probe = wl1273_probe, - .remove = wl1273_remove, - .component_driver = { + .probe = wl1273_probe, + .remove = wl1273_remove, .controls = wl1273_controls, .num_controls = ARRAY_SIZE(wl1273_controls), .dapm_widgets = wl1273_dapm_widgets, -- 1.9.1