Re: [PATCH v2 04/26] ASoC: codecs: tas2781: Use guard() for mutex locks
Cezary Rojewski <[email protected]>
| Newsgroups | gmane.linux.sound,gmane.linux.kernel,gmane.linux.ports.arm.msm |
|---|---|
| Message-ID | <[email protected]> |
On 7/27/2026 11:40 AM, [email protected] wrote: > @@ -1766,12 +1762,10 @@ static int tasdevice_dapm_event(struct snd_soc_dapm_widget *w, > int state = 0; > > /* Codec Lock Hold */ > - mutex_lock(&tas_priv->codec_lock); > + guard(mutex)(&tas_priv->codec_lock); > if (event == SND_SOC_DAPM_PRE_PMD) > state = 1; > tasdevice_tuning_switch(tas_priv, state); > - /* Codec Lock Release*/ If you dropped one comment, you might as well drop the "Hold" one too. TBH, these were redundant to begin with. > - mutex_unlock(&tas_priv->codec_lock); > > return 0; > }