mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [RESEND][PATCH 1/2] regulator: da9062: Simplify the code iterating all regulators
@ 2019-10-07 11:50 Axel Lin
  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-07 13:03 ` Applied "regulator: da9062: Simplify the code iterating all regulators" " Mark Brown
  0 siblings, 2 replies; 10+ messages in thread
From: Axel Lin @ 2019-10-07 11:50 UTC (permalink / raw)
  To: Mark Brown
  Cc: Steve Twiss, Support Opensource, Liam Girdwood, linux-kernel, Axel Lin

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 = &regulators->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


^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2019-10-08 18:09 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-07 11:50 [RESEND][PATCH 1/2] regulator: da9062: Simplify the code iterating all regulators Axel Lin
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

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®