linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
To: linux-kernel@vger.kernel.org
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	stable@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>,
	Sebastian Reichel <sebastian.reichel@collabora.com>,
	Sasha Levin <sashal@kernel.org>
Subject: [PATCH 5.13 03/35] power: supply: ab8500: Call battery population once
Date: Fri,  6 Aug 2021 10:16:46 +0200	[thread overview]
Message-ID: <20210806081113.827211342@linuxfoundation.org> (raw)
In-Reply-To: <20210806081113.718626745@linuxfoundation.org>

From: Linus Walleij <linus.walleij@linaro.org>

[ Upstream commit 7e2bb83c617f8fccc04db7d03f105a06b9d491a9 ]

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>
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
 drivers/power/supply/ab8500_btemp.c    | 7 -------
 drivers/power/supply/ab8500_fg.c       | 6 ------
 drivers/power/supply/abx500_chargalg.c | 7 -------
 3 files changed, 20 deletions(-)

diff --git a/drivers/power/supply/ab8500_btemp.c b/drivers/power/supply/ab8500_btemp.c
index 4df305c767c5..dbdcff32f353 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);
diff --git a/drivers/power/supply/ab8500_fg.c b/drivers/power/supply/ab8500_fg.c
index 46c718e9ebb7..146a5f03818f 100644
--- a/drivers/power/supply/ab8500_fg.c
+++ b/drivers/power/supply/ab8500_fg.c
@@ -3058,12 +3058,6 @@ static int ab8500_fg_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;
-	}
-
 	mutex_init(&di->cc_lock);
 
 	/* get parent data */
diff --git a/drivers/power/supply/abx500_chargalg.c b/drivers/power/supply/abx500_chargalg.c
index 599684ce0e4b..a17849bfacbf 100644
--- a/drivers/power/supply/abx500_chargalg.c
+++ b/drivers/power/supply/abx500_chargalg.c
@@ -2002,7 +2002,6 @@ static const struct component_ops abx500_chargalg_component_ops = {
 static int abx500_chargalg_probe(struct platform_device *pdev)
 {
 	struct device *dev = &pdev->dev;
-	struct device_node *np = dev->of_node;
 	struct power_supply_config psy_cfg = {};
 	struct abx500_chargalg *di;
 	int ret = 0;
@@ -2013,12 +2012,6 @@ static int abx500_chargalg_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 device struct and parent */
 	di->dev = dev;
 	di->parent = dev_get_drvdata(pdev->dev.parent);
-- 
2.30.2




  parent reply	other threads:[~2021-08-06  8:25 UTC|newest]

Thread overview: 45+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-08-06  8:16 [PATCH 5.13 00/35] 5.13.9-rc1 review Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 01/35] drm/i915: Revert "drm/i915/gem: Asynchronous cmdparser" Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 02/35] Revert "drm/i915: Propagate errors on awaiting already signaled fences" Greg Kroah-Hartman
2021-08-06  8:16 ` Greg Kroah-Hartman [this message]
2021-08-06  8:16 ` [PATCH 5.13 04/35] skmsg: Increase sk->sk_drops when dropping packets Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 05/35] skmsg: Pass source psock to sk_psock_skb_redirect() Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 06/35] bpf, sockmap: On cleanup we additionally need to remove cached skb Greg Kroah-Hartman
2021-08-07 17:45   ` Naresh Kamboju
2021-08-09 17:33     ` John Fastabend
2021-08-06  8:16 ` [PATCH 5.13 07/35] cifs: use helpers when parsing uid/gid mount options and validate them Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 08/35] cifs: add missing parsing of backupuid Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 09/35] net: dsa: sja1105: parameterize the number of ports Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 10/35] net: dsa: sja1105: fix address learning getting disabled on the CPU port Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 11/35] ASoC: Intel: boards: handle hda-dsp-common as a module Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 12/35] ASoC: Intel: boards: create sof-maxim-common module Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 13/35] ASoC: Intel: boards: fix xrun issue on platform with max98373 Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 14/35] regulator: rtmv20: Fix wrong mask for strobe-polarity-high Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 15/35] regulator: rt5033: Fix n_voltages settings for BUCK and LDO Greg Kroah-Hartman
2021-08-06  8:16 ` [PATCH 5.13 16/35] spi: stm32h7: fix full duplex irq handler handling Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 17/35] ASoC: tlv320aic31xx: fix reversed bclk/wclk master bits Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 18/35] regulator: mtk-dvfsrc: Fix wrong dev pointer for devm_regulator_register Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 19/35] r8152: Fix potential PM refcount imbalance Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 20/35] r8152: Fix a deadlock by doubly PM resume Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 21/35] qed: fix possible unpaired spin_{un}lock_bh in _qed_mcp_cmd_and_union() Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 22/35] ASoC: rt5682: Fix the issue of garbled recording after powerd_dbus_suspend Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 23/35] net: Fix zero-copy head len calculation Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 24/35] ASoC: ti: j721e-evm: Fix unbalanced domain activity tracking during startup Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 25/35] ASoC: ti: j721e-evm: Check for not initialized parent_clk_id Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 26/35] efi/mokvar: Reserve the table only if it is in boot services data Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 27/35] nvme: fix nvme_setup_command metadata trace event Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 28/35] drm/amd/display: Fix comparison error in dcn21 DML Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 29/35] drm/amd/display: Fix max vstartup calculation for modes with borders Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 30/35] io_uring: never attempt iopoll reissue from release path Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 31/35] io_uring: explicitly catch any illegal async queue attempt Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 32/35] Revert "spi: mediatek: fix fifo rx mode" Greg Kroah-Hartman
2021-08-06 18:54   ` Guenter Roeck
2021-08-07  8:20     ` Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 33/35] Revert "Bluetooth: Shutdown controller after workqueues are flushed or cancelled" Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 34/35] Revert "watchdog: iTCO_wdt: Account for rebooting on second timeout" Greg Kroah-Hartman
2021-08-06  8:17 ` [PATCH 5.13 35/35] drm/amd/display: Fix ASSR regression on embedded panels Greg Kroah-Hartman
2021-08-06 10:44 ` [PATCH 5.13 00/35] 5.13.9-rc1 review Fox Chen
2021-08-06 18:59 ` Guenter Roeck
2021-08-06 23:45 ` Justin Forbes
2021-08-07 13:16 ` Aakash Hemadri
2021-08-07 17:55 ` Naresh Kamboju

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210806081113.827211342@linuxfoundation.org \
    --to=gregkh@linuxfoundation.org \
    --cc=linus.walleij@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=sashal@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=stable@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).