From mboxrd@z Thu Jan 1 00:00:00 1970 From: Kuninori Morimoto Subject: [PATCH 08/23] ASoC: au1x: psc-i2s.c: use devm_snd_soc_register_component() Date: 27 Jun 2019 11:00:33 +0900 Message-ID: <87r27fiyby.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 D2BDCF8974B for ; Thu, 27 Jun 2019 04:00:33 +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/au1x/psc-i2s.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sound/soc/au1x/psc-i2s.c b/sound/soc/au1x/psc-i2s.c index 4a5a095..076303f 100644 --- a/sound/soc/au1x/psc-i2s.c +++ b/sound/soc/au1x/psc-i2s.c @@ -340,16 +340,14 @@ static int au1xpsc_i2s_drvprobe(struct platform_device *pdev) platform_set_drvdata(pdev, wd); - return snd_soc_register_component(&pdev->dev, &au1xpsc_i2s_component, - &wd->dai_drv, 1); + return devm_snd_soc_register_component(&pdev->dev, + &au1xpsc_i2s_component, &wd->dai_drv, 1); } static int au1xpsc_i2s_drvremove(struct platform_device *pdev) { struct au1xpsc_audio_data *wd = platform_get_drvdata(pdev); - snd_soc_unregister_component(&pdev->dev); - __raw_writel(0, I2S_CFG(wd)); wmb(); /* drain writebuffer */ __raw_writel(PSC_CTRL_DISABLE, PSC_CTRL(wd)); -- 2.7.4