Merge tag 'asoc-fix-v5.18-rc3' of https://git.kernel.org/pub/scm/linux/kernel/git...
[linux-block.git] / sound / pci / hda / patch_realtek.c
index 44aed1a548457b01e8ba80ca4368b672008158e9..62fbf3772b4123db475cea1a53797eb05bd87ff5 100644 (file)
@@ -6582,11 +6582,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;
@@ -6647,7 +6642,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)
@@ -6706,9 +6701,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)