aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/regulator/s5m8767.c
diff options
context:
space:
mode:
authorAxel Lin <axel.lin@gmail.com>2012-04-10 02:07:15 -0400
committerMark Brown <broonie@opensource.wolfsonmicro.com>2012-04-10 04:53:49 -0400
commitd35aad0cad46b9779085925cdbbea4a5f55e3c05 (patch)
tree2f96b1c7e669115de42e012fe1d27e8cf405d197 /drivers/regulator/s5m8767.c
parent321d2abaca231dc3ce5d8f71c7f9d0e6ee5c0c24 (diff)
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,
455 return 0; 455 return 0;
456} 456}
457 457
458static struct regulator_ops s5m8767_ldo_ops = { 458static struct regulator_ops s5m8767_ops = {
459 .list_voltage = s5m8767_list_voltage,
460 .is_enabled = s5m8767_reg_is_enabled,
461 .enable = s5m8767_reg_enable,
462 .disable = s5m8767_reg_disable,
463 .get_voltage_sel = s5m8767_get_voltage_sel,
464 .set_voltage = s5m8767_set_voltage,
465 .set_voltage_time_sel = s5m8767_set_voltage_time_sel,
466};
467
468static struct regulator_ops s5m8767_buck_ops = {
469 .list_voltage = s5m8767_list_voltage, 459 .list_voltage = s5m8767_list_voltage,
470 .is_enabled = s5m8767_reg_is_enabled, 460 .is_enabled = s5m8767_reg_is_enabled,
471 .enable = s5m8767_reg_enable, 461 .enable = s5m8767_reg_enable,
@@ -478,14 +468,14 @@ static struct regulator_ops s5m8767_buck_ops = {
478#define regulator_desc_ldo(num) { \ 468#define regulator_desc_ldo(num) { \
479 .name = "LDO"#num, \ 469 .name = "LDO"#num, \
480 .id = S5M8767_LDO##num, \ 470 .id = S5M8767_LDO##num, \
481 .ops = &s5m8767_ldo_ops, \ 471 .ops = &s5m8767_ops, \
482 .type = REGULATOR_VOLTAGE, \ 472 .type = REGULATOR_VOLTAGE, \
483 .owner = THIS_MODULE, \ 473 .owner = THIS_MODULE, \
484} 474}
485#define regulator_desc_buck(num) { \ 475#define regulator_desc_buck(num) { \
486 .name = "BUCK"#num, \ 476 .name = "BUCK"#num, \
487 .id = S5M8767_BUCK##num, \ 477 .id = S5M8767_BUCK##num, \
488 .ops = &s5m8767_buck_ops, \ 478 .ops = &s5m8767_ops, \
489 .type = REGULATOR_VOLTAGE, \ 479 .type = REGULATOR_VOLTAGE, \
490 .owner = THIS_MODULE, \ 480 .owner = THIS_MODULE, \
491} 481}