Re: [PATCH v2 04/26] ASoC: codecs: tas2781: Use guard() for mutex locks

From: Cezary Rojewski

Date: Mon Jul 27 2026 - 07:12:47 EST


On 7/27/2026 11:40 AM, phucduc.bui@xxxxxxxxx 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;
}