regulator: core: Ensure selector is mapped
authorMark Brown <broonie@linaro.org>
Thu, 18 Jul 2013 15:06:33 +0000 (16:06 +0100)
committerMark Brown <broonie@linaro.org>
Thu, 18 Jul 2013 15:06:33 +0000 (16:06 +0100)
Clearly the testing only covered the bottom range.

Signed-off-by: Mark Brown <broonie@linaro.org>
drivers/regulator/core.c

index fd3f6e003729e84579d75e11ec5cd56a023febf8..42ae134797e01069a8c625a82de30d13399ce3f4 100644 (file)
@@ -2446,6 +2446,8 @@ int regulator_map_voltage_linear_range(struct regulator_dev *rdev,
                                return ret;
                }
 
+               ret += range->min_sel;
+
                break;
        }