projects
/
linux-drm-fsl-dcu.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
regulator: fixed: fix regulator_list_voltage() for regression
[linux-drm-fsl-dcu.git]
/
drivers
/
regulator
/
core.c
diff --git
a/drivers/regulator/core.c
b/drivers/regulator/core.c
index 6382f0af353bc257e3ee6c3b545f75c0c1f2904e..3fe13130baec12218a58230863b313bf4c20d034 100644
(file)
--- 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;