ALSA: core: Simplify snd_power_ref_and_wait() with the standard macro
authorTakashi Iwai <tiwai@suse.de>
Wed, 19 Jan 2022 09:10:50 +0000 (10:10 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 19 Jan 2022 16:26:04 +0000 (17:26 +0100)
commit8c0ae778e2874f3742bd619000b791d178c187e2
tree4875aef886334348db34cfcce2e8dcd9509d1408
parent85c25662d18903874fad585d17fc398a7ba37ab0
ALSA: core: Simplify snd_power_ref_and_wait() with the standard macro

Use wait_event_cmd() macro and simplify snd_power_ref_wait()
implementation.  This may also cover possible races in the current
open code, too.

Reviewed-by: Jaroslav Kysela <perex@perex.cz>
Link: https://lore.kernel.org/r/20220119091050.30125-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/core/init.c