[alsa-devel] [PATCH 05/23] ASoC: au1x: i2sc.c: use devm_snd_soc_register_component()

Kuninori Morimoto kuninori.morimoto.gx at renesas.com
Thu Jun 27 04:00:19 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/au1x/i2sc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/au1x/i2sc.c b/sound/soc/au1x/i2sc.c
index 46f2b44..6877365 100644
--- a/sound/soc/au1x/i2sc.c
+++ b/sound/soc/au1x/i2sc.c
@@ -265,7 +265,7 @@ static int au1xi2s_drvprobe(struct platform_device *pdev)
 
 	platform_set_drvdata(pdev, ctx);
 
-	return snd_soc_register_component(&pdev->dev, &au1xi2s_component,
+	return devm_snd_soc_register_component(&pdev->dev, &au1xi2s_component,
 					  &au1xi2s_dai_driver, 1);
 }
 
@@ -273,8 +273,6 @@ static int au1xi2s_drvremove(struct platform_device *pdev)
 {
 	struct au1xpsc_audio_data *ctx = platform_get_drvdata(pdev);
 
-	snd_soc_unregister_component(&pdev->dev);
-
 	WR(ctx, I2S_ENABLE, EN_D);	/* clock off, disable */
 
 	return 0;
-- 
2.7.4



More information about the Alsa-devel mailing list