regulator: core: Allow fixed voltage range in multiple linear ranges
authorAxel Lin <axel.lin@ingics.com>
Thu, 18 Jul 2013 14:21:57 +0000 (22:21 +0800)
committerMark Brown <broonie@linaro.org>
Thu, 18 Jul 2013 14:55:09 +0000 (15:55 +0100)
Current code does not allow fixed voltage range in multiple linear ranges.
If someone does set range->uV_step == 0 in one of the linear ranges, we hit
divided by zero bug. This patch fixes this issue.
For fixed voltage range, return any selector means the same voltage.
Thus just return 0.

Signed-off-by: Axel Lin <axel.lin@ingics.com>
Signed-off-by: Mark Brown <broonie@linaro.org>

No differences found