From: Kuninori Morimoto Subject: [PATCH v2 04/23] ASoC: ux500: ux500_pcm.c: use devm_snd_dmaengine_pcm_register() Date: 28 Jun 2019 13:08:00 +0900 Message-ID: <875zoqtkvm.wl-kuninori.morimoto.gx@renesas.com> References: <87blyitky2.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 D3A55F8973C for ; Fri, 28 Jun 2019 06:08:01 +0200 (CEST) In-Reply-To: <87blyitky2.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_dmaengine_pcm_register, let's use it. This patch also removes related empty functions Signed-off-by: Kuninori Morimoto --- v1 -> v2 - remove empty functions sound/soc/ux500/ux500_msp_dai.c | 2 -- sound/soc/ux500/ux500_pcm.c | 9 +-------- sound/soc/ux500/ux500_pcm.h | 1 - 3 files changed, 1 insertion(+), 11 deletions(-) diff --git a/sound/soc/ux500/ux500_msp_dai.c b/sound/soc/ux500/ux500_msp_dai.c index dec065f..35669b7 100644 --- a/sound/soc/ux500/ux500_msp_dai.c +++ b/sound/soc/ux500/ux500_msp_dai.c @@ -827,8 +827,6 @@ static int ux500_msp_drv_remove(struct platform_device *pdev) { struct ux500_msp_i2s_drvdata *drvdata = dev_get_drvdata(&pdev->dev); - ux500_pcm_unregister_platform(pdev); - snd_soc_unregister_component(&pdev->dev); prcmu_qos_remove_requirement(PRCMU_QOS_APE_OPP, "ux500_msp_i2s"); diff --git a/sound/soc/ux500/ux500_pcm.c b/sound/soc/ux500/ux500_pcm.c index 9445dbe..58f00d9 100644 --- a/sound/soc/ux500/ux500_pcm.c +++ b/sound/soc/ux500/ux500_pcm.c @@ -143,7 +143,7 @@ int ux500_pcm_register_platform(struct platform_device *pdev) else pcm_config = &ux500_dmaengine_pcm_config; - ret = snd_dmaengine_pcm_register(&pdev->dev, pcm_config, + ret = devm_snd_dmaengine_pcm_register(&pdev->dev, pcm_config, SND_DMAENGINE_PCM_FLAG_COMPAT); if (ret < 0) { dev_err(&pdev->dev, @@ -156,13 +156,6 @@ int ux500_pcm_register_platform(struct platform_device *pdev) } EXPORT_SYMBOL_GPL(ux500_pcm_register_platform); -int ux500_pcm_unregister_platform(struct platform_device *pdev) -{ - snd_dmaengine_pcm_unregister(&pdev->dev); - return 0; -} -EXPORT_SYMBOL_GPL(ux500_pcm_unregister_platform); - MODULE_AUTHOR("Ola Lilja"); MODULE_AUTHOR("Roger Nilsson"); MODULE_DESCRIPTION("ASoC UX500 driver"); diff --git a/sound/soc/ux500/ux500_pcm.h b/sound/soc/ux500/ux500_pcm.h index ff3ef72..d05bff2 100644 --- a/sound/soc/ux500/ux500_pcm.h +++ b/sound/soc/ux500/ux500_pcm.h @@ -16,6 +16,5 @@ #include int ux500_pcm_register_platform(struct platform_device *pdev); -int ux500_pcm_unregister_platform(struct platform_device *pdev); #endif -- 2.7.4