Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Skip to content
Commit 1b42443d authored by Nishanth Menon's avatar Nishanth Menon Committed by Mark Brown
Browse files

regulator: tps65917/palmas: Simplify multiple dereference of pdata->reg_init[idx]



Converting dt to platform data logic involves picking up information
that is unique per regulator, however we can improve readability of
the code by allocating and referencing pdata->reg_init[idx] once in
the loop.

While at it, use sizeof(*pointer) when allocating pointer. This allows
for structure name changes with minimal code change.

Signed-off-by: default avatarNishanth Menon <nm@ti.com>
Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent 036d193d
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment