diff options
author | Axel Lin <axel.lin@gmail.com> | 2011-07-10 09:44:09 -0400 |
---|---|---|
committer | Liam Girdwood <lrg@slimlogic.co.uk> | 2011-07-22 06:39:13 -0400 |
commit | d04156bca629740a661fd0738cd69ba1f08b2b20 (patch) | |
tree | fda00dde9fbcbb6e5e092fc813e75b8f8a74e51a /drivers/regulator | |
parent | a3ee13ee77feea001597415f3a231a8bd4d3c6bf (diff) |
regulator: tps65910: Add missing breaks in switch/case
Also add a default case in tps65910_list_voltage_dcdc to silence
'volt' may be used uninitialized in this function warning.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Diffstat (limited to 'drivers/regulator')
-rw-r--r-- | drivers/regulator/tps65910-regulator.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c index b07a66471fb7..8e0edab74786 100644 --- a/drivers/regulator/tps65910-regulator.c +++ b/drivers/regulator/tps65910-regulator.c | |||
@@ -759,8 +759,13 @@ static int tps65910_list_voltage_dcdc(struct regulator_dev *dev, | |||
759 | mult = (selector / VDD1_2_NUM_VOLTS) + 1; | 759 | mult = (selector / VDD1_2_NUM_VOLTS) + 1; |
760 | volt = VDD1_2_MIN_VOLT + | 760 | volt = VDD1_2_MIN_VOLT + |
761 | (selector % VDD1_2_NUM_VOLTS) * VDD1_2_OFFSET; | 761 | (selector % VDD1_2_NUM_VOLTS) * VDD1_2_OFFSET; |
762 | break; | ||
762 | case TPS65911_REG_VDDCTRL: | 763 | case TPS65911_REG_VDDCTRL: |
763 | volt = VDDCTRL_MIN_VOLT + (selector * VDDCTRL_OFFSET); | 764 | volt = VDDCTRL_MIN_VOLT + (selector * VDDCTRL_OFFSET); |
765 | break; | ||
766 | default: | ||
767 | BUG(); | ||
768 | return -EINVAL; | ||
764 | } | 769 | } |
765 | 770 | ||
766 | return volt * 100 * mult; | 771 | return volt * 100 * mult; |
@@ -898,9 +903,11 @@ static __devinit int tps65910_probe(struct platform_device *pdev) | |||
898 | case TPS65910: | 903 | case TPS65910: |
899 | pmic->get_ctrl_reg = &tps65910_get_ctrl_register; | 904 | pmic->get_ctrl_reg = &tps65910_get_ctrl_register; |
900 | info = tps65910_regs; | 905 | info = tps65910_regs; |
906 | break; | ||
901 | case TPS65911: | 907 | case TPS65911: |
902 | pmic->get_ctrl_reg = &tps65911_get_ctrl_register; | 908 | pmic->get_ctrl_reg = &tps65911_get_ctrl_register; |
903 | info = tps65911_regs; | 909 | info = tps65911_regs; |
910 | break; | ||
904 | default: | 911 | default: |
905 | pr_err("Invalid tps chip version\n"); | 912 | pr_err("Invalid tps chip version\n"); |
906 | kfree(pmic); | 913 | kfree(pmic); |