[alsa-devel] [PATCH v2 04/23] ASoC: ux500: ux500_pcm.c: use devm_snd_dmaengine_pcm_register()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Fri Jun 28 06:08:00 CEST 2019
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
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 <kuninori.morimoto.gx at renesas.com>
---
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 <linux/workqueue.h>
int ux500_pcm_register_platform(struct platform_device *pdev);
-int ux500_pcm_unregister_platform(struct platform_device *pdev);
#endif
--
2.7.4
More information about the Alsa-devel
mailing list