lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220214060819.7334-24-yong.wu@mediatek.com>
Date:   Mon, 14 Feb 2022 14:08:19 +0800
From:   Yong Wu <yong.wu@...iatek.com>
To:     Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        David Airlie <airlied@...ux.ie>,
        Daniel Vetter <daniel@...ll.ch>,
        <dri-devel@...ts.freedesktop.org>
CC:     James Wang <james.qian.wang@....com>,
        Liviu Dudau <liviu.dudau@....com>,
        <iommu@...ts.linux-foundation.org>,
        Matthias Brugger <matthias.bgg@...il.com>,
        Krzysztof Kozlowski <krzysztof.kozlowski@...onical.com>,
        <linux-kernel@...r.kernel.org>, "Joerg Roedel" <joro@...tes.org>,
        Will Deacon <will@...nel.org>, Arnd Bergmann <arnd@...db.de>,
        Laurent Pinchart <laurent.pinchart@...asonboard.com>,
        <linux-mediatek@...ts.infradead.org>,
        Chun-Kuang Hu <chunkuang.hu@...nel.org>,
        <linux-arm-kernel@...ts.infradead.org>,
        "Stephen Boyd" <sboyd@...nel.org>,
        AngeloGioacchino Del Regno 
        <angelogioacchino.delregno@...labora.com>,
        Hsin-Yi Wang <hsinyi@...omium.org>,
        Robin Murphy <robin.murphy@....com>,
        Tomasz Figa <tfiga@...omium.org>,
        <srv_heupstream@...iatek.com>, Rob Clark <robdclark@...il.com>,
        Srinivas Kandagatla <srinivas.kandagatla@...aro.org>,
        Sebastian Reichel <sre@...nel.org>,
        Yong Wu <yong.wu@...iatek.com>,
        "Jaroslav Kysela" <perex@...ex.cz>, Takashi Iwai <tiwai@...e.com>,
        Jeremy Szu <jeremy.szu@...onical.com>,
        Werner Sembach <wse@...edocomputers.com>,
        "Hui Wang" <hui.wang@...onical.com>,
        Cameron Berkenpas <cam@...-zeon.de>,
        "Kailang Yang" <kailang@...ltek.com>,
        Lucas Tanure <tanureal@...nsource.cirrus.com>,
        Sami Loone <sami@...ne.fi>, <alsa-devel@...a-project.org>
Subject: [PATCH 23/23] ALSA: hda/realtek: Make use of the helper component_compare_dev_name

Use the common compare helper from component.

Cc: Jaroslav Kysela <perex@...ex.cz>
Cc: Takashi Iwai <tiwai@...e.com>
Cc: Jeremy Szu <jeremy.szu@...onical.com>
Cc: Werner Sembach <wse@...edocomputers.com>
Cc: Hui Wang <hui.wang@...onical.com>
Cc: Cameron Berkenpas <cam@...-zeon.de>
Cc: Kailang Yang <kailang@...ltek.com>
Cc: Lucas Tanure <tanureal@...nsource.cirrus.com>
Cc: Sami Loone <sami@...ne.fi>
Cc: alsa-devel@...a-project.org
Signed-off-by: Yong Wu <yong.wu@...iatek.com>
---
 sound/pci/hda/patch_realtek.c | 11 +++--------
 1 file 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)
-- 
2.18.0

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ