diff options
| author | Takashi Iwai <tiwai@suse.de> | 2025-08-29 16:43:09 +0200 |
|---|---|---|
| committer | Takashi Iwai <tiwai@suse.de> | 2025-09-01 13:52:41 +0200 |
| commit | 9da230b3b2296df9c3d81fe6badab59a81c3d76f (patch) | |
| tree | 8ccb341dc114cf6562f066b51ce6e0c855b70afc /sound/pci/ice1712/quartet.c | |
| parent | 2b429331f55bf4d39a9be3357b0958d577bf9086 (diff) | |
ALSA: ice1712: 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/20250829144342.4290-35-tiwai@suse.de
Diffstat (limited to 'sound/pci/ice1712/quartet.c')
| -rw-r--r-- | sound/pci/ice1712/quartet.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/sound/pci/ice1712/quartet.c b/sound/pci/ice1712/quartet.c index f61ee9f5c754..099601edf1d0 100644 --- a/sound/pci/ice1712/quartet.c +++ b/sound/pci/ice1712/quartet.c @@ -396,7 +396,7 @@ static void reg_write(struct snd_ice1712 *ice, unsigned int reg, { unsigned int tmp; - mutex_lock(&ice->gpio_mutex); + guard(mutex)(&ice->gpio_mutex); /* set direction of used GPIOs*/ /* all outputs */ tmp = 0x00ffff; @@ -429,7 +429,6 @@ static void reg_write(struct snd_ice1712 *ice, unsigned int reg, ice->gpio.set_mask(ice, 0xffffff); /* outputs only 8-15 */ ice->gpio.set_dir(ice, 0x00ff00); - mutex_unlock(&ice->gpio_mutex); } static unsigned int get_scr(struct snd_ice1712 *ice) |
