Re: [PATCH v3 2/2] ASoC: codecs: add TAS2557 mono smart amplifier driver
From: Markus Elfring
Date: Sat Jul 18 2026 - 11:37:07 EST
…
> +++ b/sound/soc/codecs/tas2557.c
> @@ -0,0 +1,3067 @@
…
> +static int tas2557_dev_read(struct tas2557_priv *tas2557, unsigned int chn,
> + unsigned int reg, unsigned int *value)
> +{
…
> + mutex_lock(&tas2557->dev_lock);
> + ret = tas2557_change_book_page(tas2557, chn, TAS2557_BOOK_ID(reg),
> + TAS2557_PAGE_ID(reg));
…
> + mutex_unlock(&tas2557->dev_lock);
> + return ret;
> +}
…
Under which circumstances would you become interested to apply a statement
like “guard(mutex)(&tas2557->dev_lock);”?
https://elixir.bootlin.com/linux/v7.2-rc3/source/include/linux/mutex.h#L253
Regards,
Markus