summaryrefslogtreecommitdiffstats
path: root/drivers/power/supply/ab8500_btemp.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2021-05-23 00:50:40 +0200
committerSebastian Reichel <sre@kernel.org>2021-06-03 18:40:15 +0200
commit7e2bb83c617f8fccc04db7d03f105a06b9d491a9 (patch)
treeb8f4413717794e299779682012651f4d22bf8972 /drivers/power/supply/ab8500_btemp.c
parent1c1f13a006ed0d71bb5664c8b7e3e77a28da3beb (diff)
downloadlinux-7e2bb83c617f8fccc04db7d03f105a06b9d491a9.tar.bz2
power: supply: ab8500: Call battery population once
The code was calling ab8500_bm_of_probe() in four different spots effectively overwriting the same configuration three times. This was done because probe order was uncertain. Since we now used componentized probe, call it only once while probing the main charging component. Signed-off-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
Diffstat (limited to 'drivers/power/supply/ab8500_btemp.c')
-rw-r--r--drivers/power/supply/ab8500_btemp.c7
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index 3598b5a748e7..5b664d2f6b82 100644
--- a/drivers/power/supply/ab8500_btemp.c
+++ b/drivers/power/supply/ab8500_btemp.c
@@ -983,7 +983,6 @@ static const struct component_ops ab8500_btemp_component_ops = {
static int ab8500_btemp_probe(struct platform_device *pdev)
{
- struct device_node *np = pdev->dev.of_node;
struct power_supply_config psy_cfg = {};
struct device *dev = &pdev->dev;
struct ab8500_btemp *di;
@@ -996,12 +995,6 @@ static int ab8500_btemp_probe(struct platform_device *pdev)
di->bm = &ab8500_bm_data;
- ret = ab8500_bm_of_probe(dev, np, di->bm);
- if (ret) {
- dev_err(dev, "failed to get battery information\n");
- return ret;
- }
-
/* get parent data */
di->dev = dev;
di->parent = dev_get_drvdata(pdev->dev.parent);