summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/s5m8767.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-10 14:07:15 +0800
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 09:53:49 +0100
commitd35aad0cad46b9779085925cdbbea4a5f55e3c05 (patch)
tree2f96b1c7e669115de42e012fe1d27e8cf405d197 /drivers/regulator/s5m8767.c
parent321d2abaca231dc3ce5d8f71c7f9d0e6ee5c0c24 (diff)
downloadtalos-obmc-linux-d35aad0cad46b9779085925cdbbea4a5f55e3c05.tar.gz
talos-obmc-linux-d35aad0cad46b9779085925cdbbea4a5f55e3c05.zip
regulator: Use one s5m8767_ops for both LDOs and BUCKs
All the callback function implementation are the same for both LDOs and BUCKs. Merge them to one s5m8767_ops. Signed-off-by: Axel Lin <axel.lin@gmail.com> Acked-by: Sangbeom Kim <sbkim73@samsung.com> Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Diffstat (limited to 'drivers/regulator/s5m8767.c')
-rw-r--r--drivers/regulator/s5m8767.c16
1 files changed, 3 insertions, 13 deletions
diff --git a/drivers/regulator/s5m8767.c b/drivers/regulator/s5m8767.c
index 245cc2da4fd4..14b06c8d378f 100644
--- a/drivers/regulator/s5m8767.c
+++ b/drivers/regulator/s5m8767.c
@@ -455,17 +455,7 @@ static int s5m8767_set_voltage_time_sel(struct regulator_dev *rdev,
return 0;
}
-static struct regulator_ops s5m8767_ldo_ops = {
- .list_voltage = s5m8767_list_voltage,
- .is_enabled = s5m8767_reg_is_enabled,
- .enable = s5m8767_reg_enable,
- .disable = s5m8767_reg_disable,
- .get_voltage_sel = s5m8767_get_voltage_sel,
- .set_voltage = s5m8767_set_voltage,
- .set_voltage_time_sel = s5m8767_set_voltage_time_sel,
-};
-
-static struct regulator_ops s5m8767_buck_ops = {
+static struct regulator_ops s5m8767_ops = {
.list_voltage = s5m8767_list_voltage,
.is_enabled = s5m8767_reg_is_enabled,
.enable = s5m8767_reg_enable,
@@ -478,14 +468,14 @@ static struct regulator_ops s5m8767_buck_ops = {
#define regulator_desc_ldo(num) { \
.name = "LDO"#num, \
.id = S5M8767_LDO##num, \
- .ops = &s5m8767_ldo_ops, \
+ .ops = &s5m8767_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
}
#define regulator_desc_buck(num) { \
.name = "BUCK"#num, \
.id = S5M8767_BUCK##num, \
- .ops = &s5m8767_buck_ops, \
+ .ops = &s5m8767_ops, \
.type = REGULATOR_VOLTAGE, \
.owner = THIS_MODULE, \
}
OpenPOWER on IntegriCloud