From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 050/127] ASoC: use component probe/remove on ab8500-codec Date: Tue, 9 Aug 2016 05:16:40 +0000 Message-ID: <87popibkbj.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 E566C266C33 for ; Tue, 9 Aug 2016 07:16:45 +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/ab8500-codec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/codecs/ab8500-codec.c b/sound/soc/codecs/ab8500-codec.c index 3056487..4e4ede3 100644 --- a/sound/soc/codecs/ab8500-codec.c +++ b/sound/soc/codecs/ab8500-codec.c @@ -2458,8 +2458,9 @@ static void ab8500_codec_of_probe(struct device *dev, struct device_node *np, } } -static int ab8500_codec_probe(struct snd_soc_codec *codec) +static int ab8500_codec_probe(struct snd_soc_component *component) { + struct snd_soc_codec *codec = snd_soc_component_to_codec(component); struct snd_soc_dapm_context *dapm = snd_soc_codec_get_dapm(codec); struct device *dev = codec->dev; struct device_node *np = dev->of_node; @@ -2524,8 +2525,8 @@ static int ab8500_codec_probe(struct snd_soc_codec *codec) } static struct snd_soc_codec_driver ab8500_codec_driver = { - .probe = ab8500_codec_probe, .component_driver = { + .probe = ab8500_codec_probe, .controls = ab8500_ctrls, .num_controls = ARRAY_SIZE(ab8500_ctrls), .dapm_widgets = ab8500_dapm_widgets, -- 1.9.1