summaryrefslogtreecommitdiffstats
path: root/drivers/regulator/hi6421-regulator.c
diff options
context:
space:
mode:
authorGuodong Xu <guodong.xu@linaro.org>2014-08-19 12:07:42 +0200
committerMark Brown <broonie@linaro.org>2014-08-19 17:37:20 +0200
commitea62f4dfe329094cd988a73fe854c6f2e92dd486 (patch)
tree04b51d500f2f0959767703784b6c9ebef255d431 /drivers/regulator/hi6421-regulator.c
parentregulator: add driver for hi6421 voltage regulator (diff)
downloadlinux-ea62f4dfe329094cd988a73fe854c6f2e92dd486.tar.xz
linux-ea62f4dfe329094cd988a73fe854c6f2e92dd486.zip
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/regulator/hi6421-regulator.c')
-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)
regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
if (reg_val & info->mode_mask)
return REGULATOR_MODE_IDLE;
- else
- return REGULATOR_MODE_NORMAL;
+
+ return REGULATOR_MODE_NORMAL;
}
static 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)
regmap_read(rdev->regmap, rdev->desc->enable_reg, &reg_val);
if (reg_val & info->mode_mask)
return REGULATOR_MODE_STANDBY;
- else
- return REGULATOR_MODE_NORMAL;
+
+ return REGULATOR_MODE_NORMAL;
}
static 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,
if (load_uA > info->eco_microamp)
return REGULATOR_MODE_NORMAL;
- else
- return REGULATOR_MODE_IDLE;
+
+ return REGULATOR_MODE_IDLE;
}
static const struct regulator_ops hi6421_ldo_ops = {