From: Axel Lin <axel.lin@ingics.com>
To: Mark Brown <broonie@kernel.org>
Cc: Steve Twiss <stwiss.opensource@diasemi.com>,
Support Opensource <support.opensource@diasemi.com>,
Liam Girdwood <lgirdwood@gmail.com>,
linux-kernel@vger.kernel.org, Axel Lin <axel.lin@ingics.com>
Subject: [RESEND][PATCH 1/2] regulator: da9062: Simplify the code iterating all regulators
Date: Mon, 7 Oct 2019 19:50:08 +0800 [thread overview]
Message-ID: <20191007115009.25672-1-axel.lin@ingics.com> (raw)
It's more straightforward to use for statement here.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
---
This was sent on https://lkml.org/lkml/2019/7/11/208 with Adam's Ack.
drivers/regulator/da9062-regulator.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/regulator/da9062-regulator.c b/drivers/regulator/da9062-regulator.c
index 710e67081d53..9bb895006455 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -942,8 +942,7 @@ static int da9062_regulator_probe(struct platform_device *pdev)
regulators->n_regulators = max_regulators;
platform_set_drvdata(pdev, regulators);
- n = 0;
- while (n < regulators->n_regulators) {
+ for (n = 0; n < regulators->n_regulators; n++) {
/* Initialise regulator structure */
regl = ®ulators->regulator[n];
regl->hw = chip;
@@ -1002,8 +1001,6 @@ static int da9062_regulator_probe(struct platform_device *pdev)
regl->desc.name);
return PTR_ERR(regl->rdev);
}
-
- n++;
}
/* LDOs overcurrent event support */
--
2.20.1
next reply other threads:[~2019-10-07 11:50 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-07 11:50 Axel Lin [this message]
2019-10-07 11:50 ` [RESEND][PATCH 2/2] regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case Axel Lin
2019-10-08 10:41 ` Axel Lin
2019-10-08 10:44 ` Mark Brown
2019-10-08 10:48 ` Axel Lin
2019-10-08 10:51 ` Mark Brown
2019-10-08 10:53 ` Axel Lin
2019-10-08 11:07 ` Mark Brown
2019-10-08 18:09 ` Applied "regulator: da9062: Simplify da9062_buck_set_mode for BUCK_MODE_MANUAL case" to the regulator tree Mark Brown
2019-10-07 13:03 ` Applied "regulator: da9062: Simplify the code iterating all regulators" " Mark Brown
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=20191007115009.25672-1-axel.lin@ingics.com \
--to=axel.lin@ingics.com \
--cc=broonie@kernel.org \
--cc=lgirdwood@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=stwiss.opensource@diasemi.com \
--cc=support.opensource@diasemi.com \
/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®