diff mbox series

[05/16] ASoC: hdac_hda: use devm_snd_soc_register_component()

Message ID 87lg8erutg.wl-kuninori.morimoto.gx@renesas.com (mailing list archive)
State Accepted
Commit 10ccaa39d7628470a3de4aae9d2346a55cbee46e
Headers show
Series ASoC: use devm_snd_soc_register_component() | expand

Commit Message

Kuninori Morimoto Sept. 7, 2018, 1:01 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Now we have devm_snd_soc_register_component().
Let's use it instead of snd_soc_register_component().

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

Patch

diff --git a/sound/soc/codecs/hdac_hda.c b/sound/soc/codecs/hdac_hda.c
index 8c25a13..2aaa830 100644
--- a/sound/soc/codecs/hdac_hda.c
+++ b/sound/soc/codecs/hdac_hda.c
@@ -448,7 +448,7 @@  static int hdac_hda_dev_probe(struct hdac_device *hdev)
 		return -ENOMEM;
 
 	/* ASoC specific initialization */
-	ret = snd_soc_register_component(&hdev->dev,
+	ret = devm_snd_soc_register_component(&hdev->dev,
 					 &hdac_hda_codec, hdac_hda_dais,
 					 ARRAY_SIZE(hdac_hda_dais));
 	if (ret < 0) {
@@ -464,7 +464,6 @@  static int hdac_hda_dev_probe(struct hdac_device *hdev)
 
 static int hdac_hda_dev_remove(struct hdac_device *hdev)
 {
-	snd_soc_unregister_component(&hdev->dev);
 	return 0;
 }