regulator: palmas: Simplify code by not indexing regulator_desc unnecessarily
authorNishanth Menon <nm@ti.com>
Mon, 30 Jun 2014 15:57:38 +0000 (10:57 -0500)
committerMark Brown <broonie@linaro.org>
Thu, 3 Jul 2014 14:25:56 +0000 (15:25 +0100)
commit429222d00531b348076862ea4fd8cd694bf064a9
tree6da9ac1b5d8e4d33177a9d6169f6995c028d1c5a
parent6839cd6f6487969e969ced2245bfdabaf7005f6b
regulator: palmas: Simplify code by not indexing regulator_desc unnecessarily

Palmas regulator needs to full up the regulator_desc based on PMIC and
type of regulator. However, we dont need to do desc[id] every time. we
can simplify by using a pointer to desc[id] and filling up the
parameters.

Signed-off-by: Nishanth Menon <nm@ti.com>
Tested-by: Stephen Warren <swarren@nvidia.com>
Tested-by: Keerthy <j-keerthy@ti.com>
Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/palmas-regulator.c