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

Cezary Rojewski <[email protected]>
Newsgroups org.kernel.vger.linux-sound,org.kernel.vger.linux-arm-msm,org.kernel.vger.linux-kernel
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;
>   }
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.