aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYong Wu <[email protected]>2022-02-14 14:08:19 +0800
committerGreg Kroah-Hartman <[email protected]>2022-02-25 12:16:14 +0100
commitae016b9da7bcb3b4ddd95afc406ddf5b27a859d5 (patch)
tree5b34014e995ba82df165ea4b0130ba0c49988214
parentf790ce387372b13b0bf3caf36c8e7201f9527e13 (diff)
ALSA: hda/realtek: Make use of the helper component_compare_dev_name
Use the common compare helper from component. Cc: Jaroslav Kysela <[email protected]> Cc: Takashi Iwai <[email protected]> Cc: Jeremy Szu <[email protected]> Cc: Werner Sembach <[email protected]> Cc: Hui Wang <[email protected]> Cc: Cameron Berkenpas <[email protected]> Cc: Kailang Yang <[email protected]> Cc: Lucas Tanure <[email protected]> Cc: Sami Loone <[email protected]> Cc: [email protected] Signed-off-by: Yong Wu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
-rw-r--r--sound/pci/hda/patch_realtek.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index 668274e52674..9da004d99cdb 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6530,11 +6530,6 @@ static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
}
}
-static int comp_match_dev_name(struct device *dev, void *data)
-{
- return strcmp(dev_name(dev), data) == 0;
-}
-
static int find_comp_by_dev_name(struct alc_spec *spec, const char *name)
{
int i;
@@ -6595,7 +6590,7 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char
"%s-%s:00-cs35l41-hda.%d", bus, hid, i);
if (!name)
return;
- component_match_add(dev, &spec->match, comp_match_dev_name, name);
+ component_match_add(dev, &spec->match, component_compare_dev_name, name);
}
ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
if (ret)
@@ -6644,9 +6639,9 @@ static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const st
switch (action) {
case HDA_FIXUP_ACT_PRE_PROBE:
- component_match_add(dev, &spec->match, comp_match_dev_name,
+ component_match_add(dev, &spec->match, component_compare_dev_name,
"i2c-CLSA0100:00-cs35l41-hda.0");
- component_match_add(dev, &spec->match, comp_match_dev_name,
+ component_match_add(dev, &spec->match, component_compare_dev_name,
"i2c-CLSA0100:00-cs35l41-hda.1");
ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
if (ret)