Merge remote-tracking branch 'regulator/fix/fixed' into regulator-linus

This commit is contained in:
Mark Brown 2013-11-24 14:02:47 +00:00
commit 7e9e801f74
1 changed files with 3 additions and 0 deletions

View File

@ -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;