* [PATCH] regulator: da9062: Simplify the code iterating all regulators
@ 2019-07-11 11:47 Axel Lin
2019-07-11 12:36 ` Steve Twiss
0 siblings, 1 reply; 2+ messages in thread
From: Axel Lin @ 2019-07-11 11:47 UTC (permalink / raw)
To: Steve Twiss, Support Opensource, Liam Girdwood, linux-kernel; +Cc: Axel Lin
It's more straightforward to use for statement here.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
---
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 2ffc64622451..5ea8d58d28c5 100644
--- a/drivers/regulator/da9062-regulator.c
+++ b/drivers/regulator/da9062-regulator.c
@@ -966,8 +966,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;
@@ -1026,8 +1025,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 related [flat|nested] 2+ messages in thread
* RE: [PATCH] regulator: da9062: Simplify the code iterating all regulators
2019-07-11 11:47 [PATCH] regulator: da9062: Simplify the code iterating all regulators Axel Lin
@ 2019-07-11 12:36 ` Steve Twiss
0 siblings, 0 replies; 2+ messages in thread
From: Steve Twiss @ 2019-07-11 12:36 UTC (permalink / raw)
To: Axel Lin, Support Opensource, Liam Girdwood, linux-kernel; +Cc: Steve Twiss
On 11 July 2019 12:47, Axel Lin wrote:
> To: Steve Twiss; Support Opensource; Liam Girdwood; linux-kernel@vger.kernel.org
> Cc: Axel Lin
> Subject: [PATCH] regulator: da9062: Simplify the code iterating all regulators
>
> It's more straightforward to use for statement here.
Thanks Axel,
Acked-by: Steve Twiss <stwiss.opensource@diasemi.com>
Regards,
Steve
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2019-07-11 12:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-11 11:47 [PATCH] regulator: da9062: Simplify the code iterating all regulators Axel Lin
2019-07-11 12:36 ` Steve Twiss
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).