From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 038/127] ASoC: use component probe/remove on cs4271 Date: Tue, 9 Aug 2016 05:10:58 +0000 Message-ID: <877fbqcz5j.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 A7360266B1C for ; Tue, 9 Aug 2016 07:11:03 +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/cs4271.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/sound/soc/codecs/cs4271.c b/sound/soc/codecs/cs4271.c index 8c0f3b8..5f2673b 100644 --- a/sound/soc/codecs/cs4271.c +++ b/sound/soc/codecs/cs4271.c @@ -567,8 +567,9 @@ MODULE_DEVICE_TABLE(of, cs4271_dt_ids); EXPORT_SYMBOL_GPL(cs4271_dt_ids); #endif -static int cs4271_codec_probe(struct snd_soc_codec *codec) +static int cs4271_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); struct cs4271_platform_data *cs4271plat = codec->dev->platform_data; int ret; @@ -625,8 +626,9 @@ static int cs4271_codec_probe(struct snd_soc_codec *codec) return 0; } -static int cs4271_codec_remove(struct snd_soc_codec *codec) +static void cs4271_codec_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct cs4271_private *cs4271 = snd_soc_codec_get_drvdata(codec); if (gpio_is_valid(cs4271->gpio_nreset)) @@ -635,17 +637,15 @@ static int cs4271_codec_remove(struct snd_soc_codec *codec) regcache_mark_dirty(cs4271->regmap); regulator_bulk_disable(ARRAY_SIZE(cs4271->supplies), cs4271->supplies); - - return 0; }; static struct snd_soc_codec_driver soc_codec_dev_cs4271 = { - .probe = cs4271_codec_probe, - .remove = cs4271_codec_remove, .suspend = cs4271_soc_suspend, .resume = cs4271_soc_resume, .component_driver = { + .probe = cs4271_codec_probe, + .remove = cs4271_codec_remove, .controls = cs4271_snd_controls, .num_controls = ARRAY_SIZE(cs4271_snd_controls), .dapm_widgets = cs4271_dapm_widgets, -- 1.9.1