ALSA: cs423x: Use guard() for mutex locks

Replace the manual mutex lock/unlock pairs with guard() for code
simplification.

Only code refactoring, and no behavior change.

Signed-off-by: Takashi Iwai <tiwai@suse.de>
Link: https://patch.msgid.link/20250829145300.5460-4-tiwai@suse.de
This commit is contained in:
Takashi Iwai 2025-08-29 16:52:43 +02:00
parent ca1d5ca2e5
commit 14ba220697
1 changed files with 1 additions and 2 deletions

View File

@ -956,7 +956,7 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn
enable = ucontrol->value.integer.value[0] & 1;
mutex_lock(&chip->mce_mutex);
guard(mutex)(&chip->mce_mutex);
snd_wss_mce_up(chip);
spin_lock_irqsave(&chip->reg_lock, flags);
val = (chip->image[CS4231_ALT_FEATURE_1] & ~0x0e) | (0<<2) | (enable << 1);
@ -969,7 +969,6 @@ static int snd_cs4236_put_iec958_switch(struct snd_kcontrol *kcontrol, struct sn
snd_cs4236_ctrl_out(chip, 4, val);
spin_unlock_irqrestore(&chip->reg_lock, flags);
snd_wss_mce_down(chip);
mutex_unlock(&chip->mce_mutex);
#if 0
dev_dbg(chip->card->dev,