diff mbox series

[5/6] ASoC: ux500: use devm_snd_soc_register_card()

Message ID 87zfxef03t.wl-kuninori.morimoto.gx@renesas.com
State New
Headers show
Series ASoC: use devm_snd_soc_register_card() | expand

Commit Message

Kuninori Morimoto Jan. 10, 2024, 1:28 a.m. UTC
Let's use devm_snd_soc_register_card() instead of snd_soc_register_card()
and ignore snd_soc_unregister_card()

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 sound/soc/ux500/mop500.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/sound/soc/ux500/mop500.c b/sound/soc/ux500/mop500.c
index e0ab4534fe3e..1696fa80b11b 100644
--- a/sound/soc/ux500/mop500.c
+++ b/sound/soc/ux500/mop500.c
@@ -126,7 +126,7 @@  static int mop500_probe(struct platform_device *pdev)
 		__func__, mop500_card.name,
 		mop500_card.dai_link[0].stream_name);
 
-	ret = snd_soc_register_card(&mop500_card);
+	ret = devm_snd_soc_register_card(&pdev->dev, &mop500_card);
 	if (ret)
 		dev_err(&pdev->dev,
 			"Error: snd_soc_register_card failed (%d)!\n", ret);
@@ -140,7 +140,6 @@  static void mop500_remove(struct platform_device *pdev)
 
 	pr_debug("%s: Enter.\n", __func__);
 
-	snd_soc_unregister_card(card);
 	mop500_ab8500_remove(card);
 	mop500_of_node_put();
 }