aboutsummaryrefslogtreecommitdiffstats
path: root/drivers
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2014-08-19 06:07:42 -0400
committerMark Brown <broonie@linaro.org>2014-08-19 11:37:20 -0400
commitea62f4dfe329094cd988a73fe854c6f2e92dd486 (patch)
tree04b51d500f2f0959767703784b6c9ebef255d431 /drivers
parent87ca186f7eb663fc5e52b65452a91fe0fec170a0 (diff)
regulator: hi6421: style fix, else with a single return is not required
style fix for warnings. 'else' with a single 'return' is usually not required. Signed-off-by: Guodong Xu <guodong.xu@linaro.org> Signed-off-by: Mark Brown <broonie@linaro.org>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/regulator/hi6421-regulator.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/regulator/hi6421-regulator.c b/drivers/regulator/hi6421-regulator.c
index b40851eb5466..b0de92bee4a2 100644
--- a/drivers/regulator/hi6421-regulator.c
+++ b/drivers/regulator/hi6421-regulator.c
@@ -435,8 +435,8 @@ static unsigned int hi6421_regulator_ldo_get_mode(struct regulator_dev *rdev)
435 regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val); 435 regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
436 if (reg_val & info->mode_mask) 436 if (reg_val & info->mode_mask)
437 return REGULATOR_MODE_IDLE; 437 return REGULATOR_MODE_IDLE;
438 else 438
439 return REGULATOR_MODE_NORMAL; 439 return REGULATOR_MODE_NORMAL;
440} 440}
441 441
442static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev) 442static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev)
@@ -447,8 +447,8 @@ static unsigned int hi6421_regulator_buck_get_mode(struct regulator_dev *rdev)
447 regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val); 447 regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
448 if (reg_val & info->mode_mask) 448 if (reg_val & info->mode_mask)
449 return REGULATOR_MODE_STANDBY; 449 return REGULATOR_MODE_STANDBY;
450 else 450
451 return REGULATOR_MODE_NORMAL; 451 return REGULATOR_MODE_NORMAL;
452} 452}
453 453
454static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev, 454static int hi6421_regulator_ldo_set_mode(struct regulator_dev *rdev,
@@ -506,8 +506,8 @@ unsigned int hi6421_regulator_ldo_get_optimum_mode(struct regulator_dev *rdev,
506 506
507 if (load_uA > info->eco_microamp) 507 if (load_uA > info->eco_microamp)
508 return REGULATOR_MODE_NORMAL; 508 return REGULATOR_MODE_NORMAL;
509 else 509
510 return REGULATOR_MODE_IDLE; 510 return REGULATOR_MODE_IDLE;
511} 511}
512 512
513static const struct regulator_ops hi6421_ldo_ops = { 513static const struct regulator_ops hi6421_ldo_ops = {