[PATCH 05/16] ALSA: oxygen: use new match_string() helper/macro
From: Alexandru Ardelean
Date: Wed May 08 2019 - 07:31:02 EST
The change is purely cosmetic at this point in time, but it does highlight
the change done in lib/string.c for match_string().
Particularly for this change, a control mode can be removed/added at a
different index/enum-value, and the match_string() helper will continue
until the end of the array and ignore the NULL.
Signed-off-by: Alexandru Ardelean <alexandru.ardelean@xxxxxxxxxx>
---
sound/pci/oxygen/oxygen_mixer.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sound/pci/oxygen/oxygen_mixer.c b/sound/pci/oxygen/oxygen_mixer.c
index 13c2fb75fd71..961fd1cbc712 100644
--- a/sound/pci/oxygen/oxygen_mixer.c
+++ b/sound/pci/oxygen/oxygen_mixer.c
@@ -1086,7 +1086,7 @@ static int add_controls(struct oxygen *chip,
err = snd_ctl_add(chip->card, ctl);
if (err < 0)
return err;
- j = __match_string(known_ctl_names, CONTROL_COUNT, ctl->id.name);
+ j = match_string(known_ctl_names, ctl->id.name);
if (j >= 0) {
chip->controls[j] = ctl;
ctl->private_free = oxygen_any_ctl_free;
--
2.17.1