diff options
author | Mark Brown <broonie@linaro.org> | 2013-11-24 14:02:47 +0000 |
---|---|---|
committer | Mark Brown <broonie@linaro.org> | 2013-11-24 14:02:47 +0000 |
commit | 7e9e801f746cfc66c0666e6cffa7479eebeab171 (patch) | |
tree | c3966d5b4978a8cecf6ebfb673683563eb640b63 /drivers/regulator | |
parent | Merge remote-tracking branch 'regulator/fix/arizona' into regulator-linus (diff) | |
parent | regulator: fixed: fix regulator_list_voltage() for regression (diff) | |
download | linux-dev-7e9e801f746cfc66c0666e6cffa7479eebeab171.tar.xz linux-dev-7e9e801f746cfc66c0666e6cffa7479eebeab171.zip |
Merge remote-tracking branch 'regulator/fix/fixed' into regulator-linus
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/core.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 6382f0af353b..3fe13130baec 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -2184,6 +2184,9 @@ int regulator_list_voltage(struct regulator *regulator, unsigned selector) struct regulator_ops *ops = rdev->desc->ops; int ret; + if (rdev->desc->fixed_uV && rdev->desc->n_voltages == 1 && !selector) + return rdev->desc->fixed_uV; + if (!ops->list_voltage || selector >= rdev->desc->n_voltages) return -EINVAL; |