From: Pierre-Louis Bossart Date: Wed, 2 Sep 2020 21:21:23 +0000 (-0500) Subject: ALSA: core: init: use DECLARE_COMPLETION_ONSTACK() macro X-Git-Tag: v5.15~2585^2~9^2~39 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=bec206db9db59cbc14993583288e7489e8ab02b1;p=platform%2Fkernel%2Flinux-starfive.git 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 Link: https://lore.kernel.org/r/20200902212133.30964-9-pierre-louis.bossart@linux.intel.com Signed-off-by: Takashi Iwai --- diff --git a/sound/core/init.c b/sound/core/init.c index 0478847b..764dbe6 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)