From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 10/23] ASoC: cirrus: ep93xx-ac97.c: use devm_snd_soc_register_component() Date: 27 Jun 2019 11:00:42 +0900 Message-ID: <87o92jiybp.wl-kuninori.morimoto.gx@renesas.com> References: <8736jvkcy1.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 relmlie6.idc.renesas.com (relmlor2.renesas.com [210.160.252.172]) by alsa1.perex.cz (Postfix) with ESMTP id D48E5F896FD for ; Thu, 27 Jun 2019 04:00:43 +0200 (CEST) In-Reply-To: <8736jvkcy1.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" To: Mark Brown Cc: Linux-ALSA List-Id: alsa-devel@alsa-project.org From: Kuninori Morimoto We have devm_xxx version of snd_soc_register_component, let's use it. Signed-off-by: Kuninori Morimoto --- sound/soc/cirrus/ep93xx-ac97.c | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/sound/soc/cirrus/ep93xx-ac97.c b/sound/soc/cirrus/ep93xx-ac97.c index 84c967f..f074857 100644 --- a/sound/soc/cirrus/ep93xx-ac97.c +++ b/sound/soc/cirrus/ep93xx-ac97.c @@ -397,19 +397,17 @@ static int ep93xx_ac97_probe(struct platform_device *pdev) if (ret) goto fail; - ret = snd_soc_register_component(&pdev->dev, &ep93xx_ac97_component, - &ep93xx_ac97_dai, 1); + ret = devm_snd_soc_register_component(&pdev->dev, + &ep93xx_ac97_component, &ep93xx_ac97_dai, 1); if (ret) goto fail; ret = devm_ep93xx_pcm_platform_register(&pdev->dev); if (ret) - goto fail_unregister; + goto fail; return 0; -fail_unregister: - snd_soc_unregister_component(&pdev->dev); fail: ep93xx_ac97_info = NULL; snd_soc_set_ac97_ops(NULL); @@ -420,8 +418,6 @@ static int ep93xx_ac97_remove(struct platform_device *pdev) { struct ep93xx_ac97_info *info = platform_get_drvdata(pdev); - snd_soc_unregister_component(&pdev->dev); - /* disable the AC97 controller */ ep93xx_ac97_write_reg(info, AC97GCR, 0); -- 2.7.4