aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/core.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/regulator/core.c')
-rw-r--r--drivers/regulator/core.c3
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)
2184 struct regulator_ops *ops = rdev->desc->ops; 2184 struct regulator_ops *ops = rdev->desc->ops;
2185 int ret; 2185 int ret;
2186 2186
2187 if (rdev->desc->fixed_uV && rdev->desc->n_voltages == 1 && !selector)
2188 return rdev->desc->fixed_uV;
2189
2187 if (!ops->list_voltage || selector >= rdev->desc->n_voltages) 2190 if (!ops->list_voltage || selector >= rdev->desc->n_voltages)
2188 return -EINVAL; 2191 return -EINVAL;
2189 2192