[05/23] ASoC: au1x: i2sc.c: use devm_snd_soc_register_component()
diff mbox series

Message ID 87v9wriycc.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series
  • ASoC: use devm_xxx
Related show

Commit Message

Kuninori Morimoto June 27, 2019, 2 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

We have devm_xxx version of snd_soc_register_component,
let's use it.

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/au1x/i2sc.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

Patch
diff mbox series

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;