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 <perex@perex.cz> Cc: Takashi Iwai <tiwai@suse.com> Cc: Jeremy Szu <jeremy.szu@canonical.com> Cc: Werner Sembach <wse@tuxedocomputers.com> Cc: Hui Wang <hui.wang@canonical.com> Cc: Cameron Berkenpas <cam@neo-zeon.de> Cc: Kailang Yang <kailang@realtek.com> Cc: Lucas Tanure <tanureal@opensource.cirrus.com> Cc: Sami Loone <sami@loone.fi> Cc: alsa-devel@alsa-project.org Signed-off-by: Yong Wu <yong.wu@mediatek.com> Link: https://lore.kernel.org/r/20220214060819.7334-24-yong.wu@mediatek.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent f790ce3 commit ae016b9

1 file changed

Lines changed: 3 additions & 8 deletions

File tree

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)