From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 051/127] ASoC: use component probe/remove on ad1836 Date: Tue, 9 Aug 2016 05:17:06 +0000 Message-ID: <87oa52bkay.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 relmlie1.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa0.perex.cz (Postfix) with ESMTP id 1160D2671BF for ; Tue, 9 Aug 2016 07:17:11 +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/ad1836.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/sound/soc/codecs/ad1836.c b/sound/soc/codecs/ad1836.c index a478239..50daea3 100644 --- a/sound/soc/codecs/ad1836.c +++ b/sound/soc/codecs/ad1836.c @@ -248,8 +248,9 @@ static int ad1836_resume(struct snd_soc_codec *codec) #define ad1836_resume NULL #endif -static int ad1836_probe(struct snd_soc_codec *codec) +static int ad1836_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); int num_dacs, num_adcs; @@ -313,8 +314,9 @@ static int ad1836_probe(struct snd_soc_codec *codec) } /* power down chip */ -static int ad1836_remove(struct snd_soc_codec *codec) +static int ad1836_remove(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct ad1836_priv *ad1836 = snd_soc_codec_get_drvdata(codec); /* reset clock control mode */ return regmap_update_bits(ad1836->regmap, AD1836_ADC_CTRL2, @@ -322,12 +324,12 @@ static int ad1836_remove(struct snd_soc_codec *codec) } static struct snd_soc_codec_driver soc_codec_dev_ad1836 = { - .probe = ad1836_probe, - .remove = ad1836_remove, .suspend = ad1836_suspend, .resume = ad1836_resume, .component_driver = { + .probe = ad1836_probe, + .remove = ad1836_remove, .controls = ad183x_controls, .num_controls = ARRAY_SIZE(ad183x_controls), .dapm_widgets = ad183x_dapm_widgets, -- 1.9.1