summaryrefslogtreecommitdiff
path: root/sound/core
diff options
context:
space:
mode:
authorPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com>2020-09-03 00:21:23 +0300
committerTakashi Iwai <tiwai@suse.de>2020-09-03 10:26:38 +0300
commitbec206db9db59cbc14993583288e7489e8ab02b1 (patch)
tree554e903acb6fc3106677c576a1abc71e659af2a1 /sound/core
parent9725ce3949a7b3eebf003cb69fa0d7d821179233 (diff)
downloadlinux-bec206db9db59cbc14993583288e7489e8ab02b1.tar.xz
ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro
Follow recommendation in Documentation/scheduler/completion.rst and use macro to declare local 'struct completion' Signed-off-by: Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Link: https://lore.kernel.org/r/20200902212133.30964-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/core')
-rw-r--r--sound/core/init.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/core/init.c b/sound/core/init.c
index 0478847ba2b8..764dbe673d48 100644
--- a/sound/core/init.c
+++ b/sound/core/init.c
@@ -519,10 +519,9 @@ EXPORT_SYMBOL(snd_card_free_when_closed);
*/
int snd_card_free(struct snd_card *card)
{
- struct completion released;
+ DECLARE_COMPLETION_ONSTACK(released);
int ret;
- init_completion(&released);
card->release_completion = &released;
ret = snd_card_free_when_closed(card);
if (ret)