From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 095/127] ASoC: use component probe/remove on twl6040 Date: Tue, 9 Aug 2016 05:33:42 +0000 Message-ID: <87y4468qe9.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 relmlie2.idc.renesas.com (relmlor3.renesas.com [210.160.252.173]) by alsa0.perex.cz (Postfix) with ESMTP id A0D54266CE1 for ; Tue, 9 Aug 2016 07:33:48 +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/twl6040.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/twl6040.c b/sound/soc/codecs/twl6040.c index 748036e..38e702f 100644 --- a/sound/soc/codecs/twl6040.c +++ b/sound/soc/codecs/twl6040.c @@ -1097,8 +1097,9 @@ static struct snd_soc_dai_driver twl6040_dai[] = { }, }; -static int twl6040_probe(struct snd_soc_codec *codec) +static int twl6040_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct twl6040_data *priv; struct twl6040 *twl6040 = dev_get_drvdata(codec->dev->parent); struct platform_device *pdev = to_platform_device(codec->dev); @@ -1138,18 +1139,15 @@ static int twl6040_probe(struct snd_soc_codec *codec) return 0; } -static int twl6040_remove(struct snd_soc_codec *codec) +static void twl6040_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct twl6040_data *priv = snd_soc_codec_get_drvdata(codec); free_irq(priv->plug_irq, codec); - - return 0; } static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { - .probe = twl6040_probe, - .remove = twl6040_remove, .read = twl6040_read, .write = twl6040_write, .set_bias_level = twl6040_set_bias_level, @@ -1157,6 +1155,8 @@ static struct snd_soc_codec_driver soc_codec_dev_twl6040 = { .ignore_pmdown_time = true, .component_driver = { + .probe = twl6040_probe, + .remove = twl6040_remove, .controls = twl6040_snd_controls, .num_controls = ARRAY_SIZE(twl6040_snd_controls), .dapm_widgets = twl6040_dapm_widgets, -- 1.9.1