]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - drivers/regulator/core.c
treewide: Fix typo in Documentation/DocBook
[mirror_ubuntu-artful-kernel.git] / drivers / regulator / core.c
index 6a75794ab20dacf818a56112c8f1ebcedc9d57db..d59aa96a4dc48e4e6109a9d1fcdcac9bad82a0eb 100644 (file)
@@ -2134,7 +2134,7 @@ EXPORT_SYMBOL_GPL(regulator_is_enabled);
  * @regulator: regulator source
  *
  * Returns positive if the regulator driver backing the source/client
- * can change its voltage, false otherwise. Usefull for detecting fixed
+ * can change its voltage, false otherwise. Useful for detecting fixed
  * or dummy regulators and disabling voltage change logic in the client
  * driver.
  */
@@ -2189,6 +2189,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;