Skip to content

Commit bec206d

Browse files
plbossarttiwai
authored andcommitted
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>
1 parent 9725ce3 commit bec206d

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

‎sound/core/init.c‎

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -519,10 +519,9 @@ EXPORT_SYMBOL(snd_card_free_when_closed);
519519
*/
520520
int snd_card_free(struct snd_card *card)
521521
{
522-
struct completion released;
522+
DECLARE_COMPLETION_ONSTACK(released);
523523
int ret;
524524

525-
init_completion(&released);
526525
card->release_completion = &released;
527526
ret = snd_card_free_when_closed(card);
528527
if (ret)

0 commit comments

Comments
 (0)