]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
ALSA: usb-audio: Use auto-cleanup for shutdown locks
authorTakashi Iwai <tiwai@suse.de>
Mon, 11 Aug 2025 10:13:55 +0000 (12:13 +0200)
committerTakashi Iwai <tiwai@suse.de>
Wed, 13 Aug 2025 15:39:28 +0000 (17:39 +0200)
commitaff8436ed97b99cd27f192d9a71ac2b1aa7b9d03
tree1e9d23a816b242344f33e8f8bf5f80776352df18
parentefea7a57370b956ef612dc603faa2df9126cc3ed
ALSA: usb-audio: Use auto-cleanup for shutdown locks

Introduce an auto-cleanup macro for the temporary shutdown locks for
USB-audio, and replace the manual lock/unlock pairs with it.

Namely, the former

err = snd_usb_lock_shutdown(chip);
if (err < 0)
return err;
....
snd_usb_unlock_shutdown(chip);

is replaced with

CLASS(snd_usb_lock, pm)(chip);
if (pm.err < 0)
return pm.err;
....

with the automatic unlocking.

Link: https://patch.msgid.link/20250811101647.8637-1-tiwai@suse.de
Signed-off-by: Takashi Iwai <tiwai@suse.de>
sound/usb/mixer.c
sound/usb/mixer_quirks.c
sound/usb/pcm.c
sound/usb/qcom/qc_audio_offload.c
sound/usb/usbaudio.h