summaryrefslogtreecommitdiff
path: root/sound/soc/codecs/cs35l45.c
diff options
context:
space:
mode:
authorTakashi Iwai <tiwai@suse.de>2024-08-09 12:42:30 +0200
committerTakashi Iwai <tiwai@suse.de>2024-08-09 14:24:55 +0200
commit38ea4c3dc306edf6f4e483e8ad9cb8d33943afde (patch)
tree241b50a1da29ca1bafcd5115ca43d3567aec3f38 /sound/soc/codecs/cs35l45.c
parentf428cc9eac6e29d57579be4978ba210c344322ea (diff)
ALSA: control: Optimize locking for look-up
For a fast look-up of a control element via either numid or name matching (enabled via CONFIG_SND_CTL_FAST_LOOKUP), a locking isn't needed at all thanks to Xarray. OTOH, the locking is still needed for a slow linked-list traversal, and that's rather a rare case. In this patch, we reduce the use of locking at snd_ctl_find_*() API functions, and switch from controls_rwsem to controls_rwlock for avoiding unnecessary lock inversions. This also resulted in a nice cleanup, as *_unlocked() version of snd_ctl_find_*() APIs can be dropped. snd_ctl_find_id_mixer_unlocked() is still left just as an alias of snd_ctl_find_id_mixer(), since soc-card.c has a wrapper and there are several users. Once after converting there, we can remove it later. Signed-off-by: Takashi Iwai <tiwai@suse.de> Link: https://patch.msgid.link/20240809104234.8488-3-tiwai@suse.de
Diffstat (limited to 'sound/soc/codecs/cs35l45.c')
0 files changed, 0 insertions, 0 deletions