mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Alexey Charkov <alchark@flipper.net>
To: Chris Morgan <macromorgan@hotmail.com>,
	Mark Brown <broonie@kernel.org>,
	 Sebastian Reichel <sre@kernel.org>,
	Liam Girdwood <lgirdwood@gmail.com>,  Lee Jones <lee@kernel.org>
Cc: linux-kernel@vger.kernel.org,
	 Sebastian Reichel <sebastian.reichel@collabora.com>,
	 linux-pm@vger.kernel.org, Alexey Charkov <alchark@flipper.net>
Subject: [PATCH v7 1/7] regulator: bq257xx: Drop the regulator_dev from the driver data
Date: Wed, 03 Jun 2026 00:10:49 +0400	[thread overview]
Message-ID: <20260603-bq25792-v7-1-d487bed276d0@flipper.net> (raw)
In-Reply-To: <20260603-bq25792-v7-0-d487bed276d0@flipper.net>

The field was not used anywhere in the driver, so just drop it. This helps
further slim down the platform data structure.

Acked-by: Mark Brown <broonie@kernel.org>
Tested-by: Chris Morgan <macromorgan@hotmail.com>
Signed-off-by: Alexey Charkov <alchark@flipper.net>
---
 drivers/regulator/bq257xx-regulator.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/regulator/bq257xx-regulator.c b/drivers/regulator/bq257xx-regulator.c
index 09c466052c04..913ca9186bf1 100644
--- a/drivers/regulator/bq257xx-regulator.c
+++ b/drivers/regulator/bq257xx-regulator.c
@@ -15,7 +15,6 @@
 #include <linux/regulator/of_regulator.h>
 
 struct bq257xx_reg_data {
-	struct regulator_dev *bq257xx_reg;
 	struct gpio_desc *otg_en_gpio;
 	struct regulator_desc desc;
 };
@@ -145,6 +144,7 @@ static int bq257xx_regulator_probe(struct platform_device *pdev)
 	struct bq257xx_reg_data *pdata;
 	struct device_node *np = dev->of_node;
 	struct regulator_config cfg = {};
+	struct regulator_dev *rdev;
 
 	device_set_of_node_from_dev(&pdev->dev, pdev->dev.parent);
 
@@ -164,9 +164,9 @@ static int bq257xx_regulator_probe(struct platform_device *pdev)
 	if (!cfg.regmap)
 		return -ENODEV;
 
-	pdata->bq257xx_reg = devm_regulator_register(dev, &pdata->desc, &cfg);
-	if (IS_ERR(pdata->bq257xx_reg)) {
-		return dev_err_probe(&pdev->dev, PTR_ERR(pdata->bq257xx_reg),
+	rdev = devm_regulator_register(dev, &pdata->desc, &cfg);
+	if (IS_ERR(rdev)) {
+		return dev_err_probe(&pdev->dev, PTR_ERR(rdev),
 				     "error registering bq257xx regulator");
 	}
 

-- 
2.53.0


  reply	other threads:[~2026-06-02 20:11 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-02 20:10 [PATCH v7 0/7] Add support for the TI BQ25792 battery charger Alexey Charkov
2026-06-02 20:10 ` Alexey Charkov [this message]
2026-06-02 20:10 ` [PATCH v7 2/7] power: supply: bq257xx: Fix VSYSMIN clamping logic Alexey Charkov
2026-06-02 20:10 ` [PATCH v7 3/7] power: supply: bq257xx: Make the default current limit a per-chip attribute Alexey Charkov
2026-06-02 20:10 ` [PATCH v7 4/7] power: supply: bq257xx: Consistently use indirect get/set helpers Alexey Charkov
2026-06-02 20:10 ` [PATCH v7 5/7] power: supply: bq257xx: Add fields for 'charging' and 'overvoltage' states Alexey Charkov
2026-06-02 20:10 ` [PATCH v7 6/7] regulator: bq257xx: Add support for BQ25792 Alexey Charkov
2026-06-02 20:10 ` [PATCH v7 7/7] power: supply: " Alexey Charkov
2026-06-03 20:49   ` Sebastian Reichel
2026-06-03 20:52 ` [PATCH v7 0/7] Add support for the TI BQ25792 battery charger Sebastian Reichel
2026-07-25 16:35 ` (subset) " Sebastian Reichel

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=20260603-bq25792-v7-1-d487bed276d0@flipper.net \
    --to=alchark@flipper.net \
    --cc=broonie@kernel.org \
    --cc=lee@kernel.org \
    --cc=lgirdwood@gmail.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=macromorgan@hotmail.com \
    --cc=sebastian.reichel@collabora.com \
    --cc=sre@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

all inboxes | Powered by JetHome®