[16/23] ASoC: fsl: mpc5200_psc_ac97.c: use devm_snd_soc_register_component()
diff mbox series

Message ID 87ftnviyb0.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:01 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/fsl/mpc5200_psc_ac97.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Patch
diff mbox series

diff --git a/sound/soc/fsl/mpc5200_psc_ac97.c b/sound/soc/fsl/mpc5200_psc_ac97.c
index e5b9c04d..4a86e6c 100644
--- a/sound/soc/fsl/mpc5200_psc_ac97.c
+++ b/sound/soc/fsl/mpc5200_psc_ac97.c
@@ -290,7 +290,7 @@  static int psc_ac97_of_probe(struct platform_device *op)
 		return rc;
 	}
 
-	rc = snd_soc_register_component(&op->dev, &psc_ac97_component,
+	rc = devm_snd_soc_register_component(&op->dev, &psc_ac97_component,
 					psc_ac97_dai, ARRAY_SIZE(psc_ac97_dai));
 	if (rc != 0) {
 		dev_err(&op->dev, "Failed to register DAI\n");
@@ -316,7 +316,6 @@  static int psc_ac97_of_probe(struct platform_device *op)
 static int psc_ac97_of_remove(struct platform_device *op)
 {
 	mpc5200_audio_dma_destroy(op);
-	snd_soc_unregister_component(&op->dev);
 	snd_soc_set_ac97_ops(NULL);
 	return 0;
 }