summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 12:41:28 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2022-03-28 12:41:28 -0700
commit266d17a8c0d857a579813ad185cd1640b0d6ccac (patch)
tree5a35b668f26bc93cbcf0c867d38203692aaf7f92 /drivers/power/supply
parent02e2af20f4f9f2aa0c84e9a30a35c02f0fbb7daa (diff)
parent88d99e870143199ba5bf42701dca06ce1d1388f0 (diff)
downloadlinux-266d17a8c0d857a579813ad185cd1640b0d6ccac.tar.bz2
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 'drivers/power/supply')
-rw-r--r--drivers/power/supply/ab8500_charger.c8
-rw-r--r--drivers/power/supply/ab8500_fg.c3
2 files changed, 3 insertions, 8 deletions
diff --git a/drivers/power/supply/ab8500_charger.c b/drivers/power/supply/ab8500_charger.c
index b17d4649210a..d04d087caa50 100644
--- a/drivers/power/supply/ab8500_charger.c
+++ b/drivers/power/supply/ab8500_charger.c
@@ -3421,11 +3421,6 @@ static struct platform_driver *const ab8500_charger_component_drivers[] = {
&ab8500_chargalg_driver,
};
-static int ab8500_charger_compare_dev(struct device *dev, void *data)
-{
- return dev == data;
-}
-
static int ab8500_charger_probe(struct platform_device *pdev)
{
struct device *dev = &pdev->dev;
@@ -3666,8 +3661,7 @@ static int ab8500_charger_probe(struct platform_device *pdev)
while ((d = platform_find_device_by_driver(p, drv))) {
put_device(p);
- component_match_add(dev, &match,
- ab8500_charger_compare_dev, d);
+ component_match_add(dev, &match, component_compare_dev, d);
p = d;
}
put_device(p);
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 3ae8086907de..97ac588a9e9c 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -2537,10 +2537,11 @@ static struct attribute *ab8500_fg_attrs[] = {
&charge_now_attr.attr,
NULL,
};
+ATTRIBUTE_GROUPS(ab8500_fg);
static struct kobj_type ab8500_fg_ktype = {
.sysfs_ops = &ab8500_fg_sysfs_ops,
- .default_attrs = ab8500_fg_attrs,
+ .default_groups = ab8500_fg_groups,
};
/**