regulator: palmas: Simplify code by using pointer to palmas_reg_info
authorNishanth Menon <nm@ti.com>
Mon, 30 Jun 2014 15:57:36 +0000 (10:57 -0500)
committerMark Brown <broonie@linaro.org>
Thu, 3 Jul 2014 14:25:55 +0000 (15:25 +0100)
commitcf910b6b7101dae5eabaf2249b427e7698095abd
tree133873df72d8041420962c358516038f8c6b2a81
parente7cf34ef396d6ceaa776661830d4ce332da650f0
regulator: palmas: Simplify code by using pointer to palmas_reg_info

Palmas register information is part of the ddata pointer which is used
through out the code by indexing off the driver data array. Instead,
just do the indexing once and use the pointer to further reference
structure fields.

This simplifies code and prevents errors by accessing wrong variables.

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