[PATCH v2 0/3] ASoC: Use snd_ctl_find_id_mixer() instead of open-coding

From: Richard Fitzgerald
Date: Mon Apr 01 2024 - 06:02:55 EST


The first two patches change snd_soc_card_get_kcontrol() to use the
core snd_ctl_find_id_mixer() functionality instead of open-coding its
own list walk.

The last patch adds a KUnit test for this, which was tested on the
original and modified code.

Changes in V2:
Only change is in the KUnit test (patch #3) to make the const strings
more consty.

Richard Fitzgerald (3):
ALSA: control: Introduce snd_ctl_find_id_mixer_locked()
ASoC: soc-card: Use snd_ctl_find_id_mixer() instead of open-coding
ASoC: soc-card: Add KUnit test case for snd_soc_card_get_kcontrol

include/sound/control.h | 23 +++++
sound/soc/Kconfig | 8 ++
sound/soc/Makefile | 4 +
sound/soc/soc-card-test.c | 184 ++++++++++++++++++++++++++++++++++++++
sound/soc/soc-card.c | 21 +----
5 files changed, 223 insertions(+), 17 deletions(-)
create mode 100644 sound/soc/soc-card-test.c

--
2.39.2