summaryrefslogtreecommitdiff
path: root/sound/usb/mixer_us16x08.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2025-08-11 10:20:18 +0200
committerTakashi Iwai <tiwai@suse.de>2025-08-12 08:36:17 +0200
commitefea7a57370b956ef612dc603faa2df9126cc3ed (patch)
tree29f1c8c4b229f5bcf97603cf86046d69f51aea18 /sound/usb/mixer_us16x08.c
parent6ff0d95774f0c728f96b8f78367318e95e09ee64 (diff)
ALSA: usb-audio: Replace manual mutex/spinlock with guard()
This is another code cleanup by replacing the manual mutex or spinlock with guard() macros. usb_audio_disconnect() is slightly refactored (split to another function) to apply guard() cleanly, but the rest are rather straightforward conversions. No functional changes but only code refactoring. Link: https://patch.msgid.link/20250811082019.31052-1-tiwai@suse.de Signed-off-by: Takashi Iwai <tiwai@suse.de>
Diffstat (limited to 'sound/usb/mixer_us16x08.c')
-rw-r--r--sound/usb/mixer_us16x08.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/usb/mixer_us16x08.c b/sound/usb/mixer_us16x08.c
index 236b69054867..1c5712c31f5e 100644
--- a/sound/usb/mixer_us16x08.c
+++ b/sound/usb/mixer_us16x08.c
@@ -152,12 +152,11 @@ static int snd_us16x08_recv_urb(struct snd_usb_audio *chip,
unsigned char *buf, int size)
{
- mutex_lock(&chip->mutex);
+ guard(mutex)(&chip->mutex);
snd_usb_ctl_msg(chip->dev,
usb_rcvctrlpipe(chip->dev, 0),
SND_US16X08_URB_METER_REQUEST,
SND_US16X08_URB_METER_REQUESTTYPE, 0, 0, buf, size);
- mutex_unlock(&chip->mutex);
return 0;
}