aboutsummaryrefslogtreecommitdiff
path: root/sound
diff options
context:
space:
mode:
authorLinus Torvalds2022-03-28 12:41:28 -0700
committerLinus Torvalds2022-03-28 12:41:28 -0700
commit266d17a8c0d857a579813ad185cd1640b0d6ccac (patch)
tree5a35b668f26bc93cbcf0c867d38203692aaf7f92 /sound
parent02e2af20f4f9f2aa0c84e9a30a35c02f0fbb7daa (diff)
parent88d99e870143199ba5bf42701dca06ce1d1388f0 (diff)
Merge tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core updates from Greg KH: "Here is the set of driver core changes for 5.18-rc1. Not much here, primarily it was a bunch of cleanups and small updates: - kobj_type cleanups for default_groups - documentation updates - firmware loader minor changes - component common helper added and take advantage of it in many drivers (the largest part of this pull request). All of these have been in linux-next for a while with no reported problems" * tag 'driver-core-5.18-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core: (54 commits) Documentation: update stable review cycle documentation drivers/base/dd.c : Remove the initial value of the global variable Documentation: update stable tree link Documentation: add link to stable release candidate tree devres: fix typos in comments Documentation: add note block surrounding security patch note samples/kobject: Use sysfs_emit instead of sprintf base: soc: Make soc_device_match() simpler and easier to read driver core: dd: fix return value of __setup handler driver core: Refactor sysfs and drv/bus remove hooks driver core: Refactor multiple copies of device cleanup scripts: get_abi.pl: Fix typo in help message kernfs: fix typos in comments kernfs: remove unneeded #if 0 guard ALSA: hda/realtek: Make use of the helper component_compare_dev_name video: omapfb: dss: Make use of the helper component_compare_dev power: supply: ab8500: Make use of the helper component_compare_dev ASoC: codecs: wcd938x: Make use of the helper component_compare/release_of iommu/mediatek: Make use of the helper component_compare/release_of drm: of: Make use of the helper component_release_of ...
Diffstat (limited to 'sound')
-rw-r--r--sound/pci/hda/patch_realtek.c11
-rw-r--r--sound/soc/codecs/wcd938x.c18
2 files changed, 7 insertions, 22 deletions
diff --git a/sound/pci/hda/patch_realtek.c b/sound/pci/hda/patch_realtek.c
index f6ee67f41c45..c78f16944f43 100644
--- a/sound/pci/hda/patch_realtek.c
+++ b/sound/pci/hda/patch_realtek.c
@@ -6581,11 +6581,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;
@@ -6646,7 +6641,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)
@@ -6705,9 +6700,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)
diff --git a/sound/soc/codecs/wcd938x.c b/sound/soc/codecs/wcd938x.c
index 782877db8c3c..898b2887fa63 100644
--- a/sound/soc/codecs/wcd938x.c
+++ b/sound/soc/codecs/wcd938x.c
@@ -4447,16 +4447,6 @@ static const struct component_master_ops wcd938x_comp_ops = {
.unbind = wcd938x_unbind,
};
-static int wcd938x_compare_of(struct device *dev, void *data)
-{
- return dev->of_node == data;
-}
-
-static void wcd938x_release_of(struct device *dev, void *data)
-{
- of_node_put(data);
-}
-
static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
struct device *dev,
struct component_match **matchptr)
@@ -4472,8 +4462,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
}
of_node_get(wcd938x->rxnode);
- component_match_add_release(dev, matchptr, wcd938x_release_of,
- wcd938x_compare_of, wcd938x->rxnode);
+ component_match_add_release(dev, matchptr, component_release_of,
+ component_compare_of, wcd938x->rxnode);
wcd938x->txnode = of_parse_phandle(np, "qcom,tx-device", 0);
if (!wcd938x->txnode) {
@@ -4481,8 +4471,8 @@ static int wcd938x_add_slave_components(struct wcd938x_priv *wcd938x,
return -ENODEV;
}
of_node_get(wcd938x->txnode);
- component_match_add_release(dev, matchptr, wcd938x_release_of,
- wcd938x_compare_of, wcd938x->txnode);
+ component_match_add_release(dev, matchptr, component_release_of,
+ component_compare_of, wcd938x->txnode);
return 0;
}