|
@@ -2286,6 +2286,9 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
|
|
|
list_for_each_entry(rtd, &card->rtd_list, list)
|
|
|
flush_delayed_work(&rtd->delayed_work);
|
|
|
|
|
|
+ /* free the ALSA card at first; this syncs with pending operations */
|
|
|
+ snd_card_free(card->snd_card);
|
|
|
+
|
|
|
/* remove and free each DAI */
|
|
|
soc_remove_dai_links(card);
|
|
|
soc_remove_pcm_runtimes(card);
|
|
@@ -2300,9 +2303,7 @@ static int soc_cleanup_card_resources(struct snd_soc_card *card)
|
|
|
if (card->remove)
|
|
|
card->remove(card);
|
|
|
|
|
|
- snd_card_free(card->snd_card);
|
|
|
return 0;
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/* removes a socdev */
|