mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-06 19:08:57 +09:00
regulator: xz3216: Fix gcc this statement may fall through warning
drivers/regulator/xz3216.c: In function 'xz3216_dcdc_set_suspend_mode': drivers/regulator/xz3216.c:112:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/regulator/xz3216.c:115:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/regulator/xz3216.c:165:3: warning: this statement may fall through [-Wimplicit-fallthrough=] drivers/regulator/xz3216.c:168:3: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Tao Huang <huangtao@rock-chips.com> Change-Id: I4709021a667a5def61361f27a1675099bcb7b45f
This commit is contained in:
@@ -109,11 +109,11 @@ static int xz3216_dcdc_set_mode(struct regulator_dev *dev, unsigned int mode)
|
||||
|
||||
switch (mode) {
|
||||
case REGULATOR_MODE_FAST:
|
||||
regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, VSEL_MODE);
|
||||
return regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, VSEL_MODE);
|
||||
case REGULATOR_MODE_NORMAL:
|
||||
regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, 0);
|
||||
return regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, 0);
|
||||
default:
|
||||
DBG("error:dcdc_xz3216 only auto and pwm mode\n");
|
||||
return -EINVAL;
|
||||
@@ -162,11 +162,11 @@ static int xz3216_dcdc_set_suspend_mode(struct regulator_dev *dev,
|
||||
|
||||
switch (mode) {
|
||||
case REGULATOR_MODE_FAST:
|
||||
regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, VSEL_MODE);
|
||||
return regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, VSEL_MODE);
|
||||
case REGULATOR_MODE_NORMAL:
|
||||
regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, 0);
|
||||
return regmap_update_bits(xz3216->regmap, xz3216->vol_reg,
|
||||
VSEL_MODE, 0);
|
||||
default:
|
||||
DBG_ERR("error:dcdc_xz3216 only auto and pwm mode\n");
|
||||
return -EINVAL;
|
||||
|
||||
Reference in New Issue
Block a user