aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
authorMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-11 21:44:53 +0900
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-12-11 21:44:53 +0900
commitf3cd19c38c3453d3af766979ccdde91eeb8b4d05 (patch)
tree88e5368dcff3b7f44c6bf9630873f156a7b5f344 /drivers/regulator/core.c
parentMerge remote-tracking branch 'regulator/topic/gpio' into regulator-next (diff)
parentregulator: core: Fix logic to determinate if regulator can change voltage (diff)
downloadlinux-dev-f3cd19c38c3453d3af766979ccdde91eeb8b4d05.tar.xz
linux-dev-f3cd19c38c3453d3af766979ccdde91eeb8b4d05.zip
Merge remote-tracking branch 'regulator/topic/change' into regulator-next
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c
index cd1b201c91e2..0f65b246cc0c 100644
--- a/drivers/regulator/core.c
+++ b/drivers/regulator/core.c
@@ -1886,7 +1886,7 @@ int regulator_can_change_voltage(struct regulator *regulator)
if (rdev->constraints &&
rdev->constraints->valid_ops_mask & REGULATOR_CHANGE_VOLTAGE &&
- rdev->desc->n_voltages > 1)
+ (rdev->desc->n_voltages - rdev->desc->linear_min_sel) > 1)
return 1;
return 0;