regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()
authorAxel Lin <axel.lin@gmail.com>
Sun, 15 Jul 2012 08:57:12 +0000 (16:57 +0800)
committerMark Brown <broonie@opensource.wolfsonmicro.com>
Mon, 16 Jul 2012 19:58:30 +0000 (20:58 +0100)
commit5bae062830b57e75a00f1a643a6e031ad0f15129
tree0900c35136e6c48170c7034fd8f95abcebb93540
parentc6a717c9d740ec8f5bd134ac8c75b1b7c0666ff8
regulator: lp872x: Simplify implementation of lp872x_find_regulator_init_data()

Pass regulator id rahter than the index to lp872x_find_regulator_init_data(),
then the code can be simpler.
We can also get max_regulators by lp->num_regulators.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Tested-by: Milo(Woogyom) Kim <milo.kim@ti.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
drivers/regulator/lp872x.c