]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/commit
regulator: tps65917/palmas: Simplify multiple dereference of ddata->palmas_matches...
authorNishanth Menon <nm@ti.com>
Fri, 6 May 2016 00:29:49 +0000 (19:29 -0500)
committerMark Brown <broonie@kernel.org>
Fri, 6 May 2016 17:15:17 +0000 (18:15 +0100)
commit036d193d3337365e0d69cff9bb2593bfc1210e7b
treecff0a27bb78eb07ea041cde2655759ebe341233d
parente0341f1732237777d65bdda7184ea4b11fb31d53
regulator: tps65917/palmas: Simplify multiple dereference of ddata->palmas_matches[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 dereferencing ddata->palmas_matches[idx] once in the loop.

While at it fix reuse of generic palmas_matches common variable
while reporting error for a specific regulator (which may be from
65917/palmas list).

Signed-off-by: Nishanth Menon <nm@ti.com>
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/palmas-regulator.c