ALSA: control_led: Use guard() for locking
authorTakashi Iwai <tiwai@suse.de>
Tue, 27 Feb 2024 08:53:06 +0000 (09:53 +0100)
committerTakashi Iwai <tiwai@suse.de>
Wed, 28 Feb 2024 14:01:22 +0000 (15:01 +0100)
commit7dba48a474e68dcdda2b212cea131b4c9ddc7d89
tree8033819fa3a1a1096402392d61c97cf5585bc953
parent3923de04c81733b30b8ed667569632272fdfed9a
ALSA: control_led: Use guard() for locking

We can simplify the code gracefully with new guard() macro and co for
automatic cleanup of locks.

A couple of functions that use snd_card_ref() and *_unref() are also
cleaned up with a defined class, too.

Only the code refactoring, and no functional changes.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://lore.kernel.org/r/20240227085306.9764-25-tiwai@suse.de
sound/core/control_led.c