[alsa-devel] [PATCH 14/23] ASoC: fsl: imx-ssi.c: use devm_snd_soc_register_component()
Kuninori Morimoto
kuninori.morimoto.gx at renesas.com
Thu Jun 27 04:00:59 CEST 2019
From: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
We have devm_xxx version of snd_soc_register_component,
let's use it.
Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx at renesas.com>
---
sound/soc/fsl/imx-ssi.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
diff --git a/sound/soc/fsl/imx-ssi.c b/sound/soc/fsl/imx-ssi.c
index 9038b61..24b2908 100644
--- a/sound/soc/fsl/imx-ssi.c
+++ b/sound/soc/fsl/imx-ssi.c
@@ -586,7 +586,7 @@ static int imx_ssi_probe(struct platform_device *pdev)
goto failed_register;
}
- ret = snd_soc_register_component(&pdev->dev, &imx_component,
+ ret = devm_snd_soc_register_component(&pdev->dev, &imx_component,
dai, 1);
if (ret) {
dev_err(&pdev->dev, "register DAI failed\n");
@@ -603,13 +603,11 @@ static int imx_ssi_probe(struct platform_device *pdev)
if (ssi->fiq_init && ssi->dma_init) {
ret = ssi->fiq_init;
- goto failed_pcm;
+ goto failed_register;
}
return 0;
-failed_pcm:
- snd_soc_unregister_component(&pdev->dev);
failed_register:
clk_disable_unprepare(ssi->clk);
failed_clk:
@@ -625,8 +623,6 @@ static int imx_ssi_remove(struct platform_device *pdev)
if (!ssi->fiq_init)
imx_pcm_fiq_exit(pdev);
- snd_soc_unregister_component(&pdev->dev);
-
if (ssi->flags & IMX_SSI_USE_AC97)
ac97_ssi = NULL;
--
2.7.4
More information about the Alsa-devel
mailing list