diff options
author | Axel Lin <axel.lin@ingics.com> | 2013-04-07 23:17:50 +0800 |
---|---|---|
committer | Mark Brown <broonie@opensource.wolfsonmicro.com> | 2013-04-08 11:23:56 +0100 |
commit | e343ab08bddeb0ed83f0a85f06739569d3081e3a (patch) | |
tree | d867e48a22322d14359b79b1c07f290a07014968 | |
parent | bcbba9de0f66d30621a489dc8af07350f8d477fd (diff) | |
download | op-kernel-dev-e343ab08bddeb0ed83f0a85f06739569d3081e3a.zip op-kernel-dev-e343ab08bddeb0ed83f0a85f06739569d3081e3a.tar.gz |
regulator: ab8500-ext: Remove get_voltage to avoid duplicate implementation
The implementation of ab8500_ext_fixed_get_voltage is identical to
ab8500_ext_list_voltage. We can avoid the duplicate implementation by just
remove get_voltage. For fixed regulator, regulator core will call
list_voltage(rdev, 0) to get voltage if both get_voltage get_voltage_sel are
not implemented.
Signed-off-by: Axel Lin <axel.lin@ingics.com>
Acked-by: Lee Jones <lee.jones@linaro.org>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
-rw-r--r-- | drivers/regulator/ab8500-ext.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/drivers/regulator/ab8500-ext.c b/drivers/regulator/ab8500-ext.c index c7896af..9aee21c 100644 --- a/drivers/regulator/ab8500-ext.c +++ b/drivers/regulator/ab8500-ext.c @@ -237,21 +237,6 @@ static unsigned int ab8500_ext_regulator_get_mode(struct regulator_dev *rdev) return ret; } -static int ab8500_ext_fixed_get_voltage(struct regulator_dev *rdev) -{ - struct regulation_constraints *regu_constraints = rdev->constraints; - - if (regu_constraints == NULL) { - dev_err(rdev_get_dev(rdev), "regulator constraints null pointer\n"); - return -EINVAL; - } - if (regu_constraints->min_uV && regu_constraints->max_uV) { - if (regu_constraints->min_uV == regu_constraints->max_uV) - return regu_constraints->min_uV; - } - return -EINVAL; -} - static int ab8500_ext_list_voltage(struct regulator_dev *rdev, unsigned selector) { @@ -275,7 +260,6 @@ static struct regulator_ops ab8500_ext_regulator_ops = { .is_enabled = ab8500_ext_regulator_is_enabled, .set_mode = ab8500_ext_regulator_set_mode, .get_mode = ab8500_ext_regulator_get_mode, - .get_voltage = ab8500_ext_fixed_get_voltage, .list_voltage = ab8500_ext_list_voltage, }; |