Skip to content

Commit ae016b9

Browse files
YongWu-HFgregkh
authored andcommitted
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]>
1 parent f790ce3 commit ae016b9

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

sound/pci/hda/patch_realtek.c

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6530,11 +6530,6 @@ static void alc287_fixup_legion_15imhg05_speakers(struct hda_codec *codec,
65306530
}
65316531
}
65326532

6533-
static int comp_match_dev_name(struct device *dev, void *data)
6534-
{
6535-
return strcmp(dev_name(dev), data) == 0;
6536-
}
6537-
65386533
static int find_comp_by_dev_name(struct alc_spec *spec, const char *name)
65396534
{
65406535
int i;
@@ -6595,7 +6590,7 @@ static void cs35l41_generic_fixup(struct hda_codec *cdc, int action, const char
65956590
"%s-%s:00-cs35l41-hda.%d", bus, hid, i);
65966591
if (!name)
65976592
return;
6598-
component_match_add(dev, &spec->match, comp_match_dev_name, name);
6593+
component_match_add(dev, &spec->match, component_compare_dev_name, name);
65996594
}
66006595
ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
66016596
if (ret)
@@ -6644,9 +6639,9 @@ static void alc287_fixup_legion_16achg6_speakers(struct hda_codec *cdc, const st
66446639

66456640
switch (action) {
66466641
case HDA_FIXUP_ACT_PRE_PROBE:
6647-
component_match_add(dev, &spec->match, comp_match_dev_name,
6642+
component_match_add(dev, &spec->match, component_compare_dev_name,
66486643
"i2c-CLSA0100:00-cs35l41-hda.0");
6649-
component_match_add(dev, &spec->match, comp_match_dev_name,
6644+
component_match_add(dev, &spec->match, component_compare_dev_name,
66506645
"i2c-CLSA0100:00-cs35l41-hda.1");
66516646
ret = component_master_add_with_match(dev, &comp_master_ops, spec->match);
66526647
if (ret)

0 commit comments

Comments
 (0)