From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 125/127] ASoC: use component probe/remove on da7219 Date: Tue, 9 Aug 2016 05:45:18 +0000 Message-ID: <87r39y7baj.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 F2A582671AB for ; Tue, 9 Aug 2016 07:45:25 +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/da7219.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sound/soc/codecs/da7219.c b/sound/soc/codecs/da7219.c index b6411bd..31cf5e8 100644 --- a/sound/soc/codecs/da7219.c +++ b/sound/soc/codecs/da7219.c @@ -1630,8 +1630,9 @@ static struct reg_sequence da7219_rev_aa_patch[] = { { DA7219_REFERENCES, 0x08 }, }; -static int da7219_probe(struct snd_soc_codec *codec) +static int da7219_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); unsigned int rev; int ret; @@ -1718,14 +1719,15 @@ err_disable_reg: return ret; } -static int da7219_remove(struct snd_soc_codec *codec) +static void da7219_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct da7219_priv *da7219 = snd_soc_codec_get_drvdata(codec); da7219_aad_exit(codec); /* Supplies */ - return regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies); + regulator_bulk_disable(DA7219_NUM_SUPPLIES, da7219->supplies); } #ifdef CONFIG_PM @@ -1761,13 +1763,13 @@ static int da7219_resume(struct snd_soc_codec *codec) #endif static struct snd_soc_codec_driver soc_codec_dev_da7219 = { - .probe = da7219_probe, - .remove = da7219_remove, .suspend = da7219_suspend, .resume = da7219_resume, .set_bias_level = da7219_set_bias_level, .component_driver = { + .probe = da7219_probe, + .remove = da7219_remove, .controls = da7219_snd_controls, .num_controls = ARRAY_SIZE(da7219_snd_controls), .dapm_widgets = da7219_dapm_widgets, -- 1.9.1