[PATCH] ASoC: intel: use devm_snd_soc_register_dai()

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



It is still using snd_soc_{un}register_dai() manually.
Let's use devm_snd_soc_register_dai().

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@xxxxxxxxxxx>
---
 sound/soc/intel/avs/pcm.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/sound/soc/intel/avs/pcm.c b/sound/soc/intel/avs/pcm.c
index 1fbb2c2fadb5..dd03db31c2d8 100644
--- a/sound/soc/intel/avs/pcm.c
+++ b/sound/soc/intel/avs/pcm.c
@@ -1309,8 +1309,6 @@ static void avs_component_hda_unregister_dais(struct snd_soc_component *componen
 
 		for_each_pcm_streams(stream)
 			snd_soc_dapm_free_widget(snd_soc_dai_get_widget(dai, stream));
-
-		snd_soc_unregister_dai(dai);
 	}
 }
 
@@ -1375,7 +1373,7 @@ static int avs_component_hda_probe(struct snd_soc_component *component)
 			}
 		}
 
-		dai = snd_soc_register_dai(component, &dais[i], false);
+		dai = devm_snd_soc_register_dai(component->dev, component, &dais[i], false);
 		if (!dai) {
 			dev_err(component->dev, "register dai for %s failed\n",
 				pcm->name);
-- 
2.25.1




[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Pulse Audio]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux