diff options
author | Pierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> | 2020-09-02 23:21:23 +0200 |
---|---|---|
committer | Takashi Iwai <tiwai@suse.de> | 2020-09-03 09:26:38 +0200 |
commit | bec206db9db59cbc14993583288e7489e8ab02b1 (patch) | |
tree | 554e903acb6fc3106677c576a1abc71e659af2a1 /sound/core | |
parent | ALSA: compress_offload: remove redundant initialization (diff) | |
download | linux-bec206db9db59cbc14993583288e7489e8ab02b1.tar.xz linux-bec206db9db59cbc14993583288e7489e8ab02b1.zip |
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.c | 3 |
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) |