diff options
| author | Troy Mitchell <troy.mitchell@linux.spacemit.com> | 2026-05-22 21:33:58 +0800 |
|---|---|---|
| committer | Mark Brown <broonie@kernel.org> | 2026-05-25 11:42:42 +0100 |
| commit | 2555c62275a10bb7dfb4476ebe73d48df11f3112 (patch) | |
| tree | ff39d54cf30da927f1883c94a8ab1e3143b99607 /sound | |
| parent | 94bdfad3a665da68731deb56b0fe80f00a3e6da8 (diff) | |
| download | linux-next-history-2555c62275a10bb7dfb4476ebe73d48df11f3112.tar.gz | |
ASoC: soc-pcm: add DEFINE_GUARD for snd_soc_card_mutex
Define a guard class wrapping snd_soc_card_mutex_lock() and
snd_soc_card_mutex_unlock() so that scope-based locking can be used
while still picking up the SND_SOC_CARD_CLASS_RUNTIME lockdep subclass.
Signed-off-by: Troy Mitchell <troy.mitchell@linux.spacemit.com>
Link: https://patch.msgid.link/20260522-i2s-same-blk-v4-2-a71a86faaa20@linux.spacemit.com
Signed-off-by: Mark Brown <broonie@kernel.org>
Diffstat (limited to 'sound')
| -rw-r--r-- | sound/soc/soc-pcm.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/sound/soc/soc-pcm.c b/sound/soc/soc-pcm.c index 9b12eedb77c33..25e494c4ed812 100644 --- a/sound/soc/soc-pcm.c +++ b/sound/soc/soc-pcm.c @@ -26,6 +26,9 @@ #include <sound/soc-link.h> #include <sound/initval.h> + +DEFINE_GUARD(snd_soc_card_mutex, struct snd_soc_card *, + snd_soc_card_mutex_lock(_T), snd_soc_card_mutex_unlock(_T)) #define soc_pcm_ret(rtd, ret) _soc_pcm_ret(rtd, __func__, ret) static inline int _soc_pcm_ret(struct snd_soc_pcm_runtime *rtd, const char *func, int ret) |
