lkml.org 
[lkml]   [2011]   [Aug]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 3/3 v2] regulator: tps65910: verify dcdc regulator ids
Date
Add default case to switches in dcdc voltage functions.

Signed-off-by: Johan Hovold <jhovold@gmail.com>
---
drivers/regulator/tps65910-regulator.c | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/drivers/regulator/tps65910-regulator.c b/drivers/regulator/tps65910-regulator.c
index 66d2d60..633ecd4 100644
--- a/drivers/regulator/tps65910-regulator.c
+++ b/drivers/regulator/tps65910-regulator.c
@@ -534,6 +534,8 @@ static int tps65910_get_voltage_dcdc(struct regulator_dev *dev)
srvsel &= VDDCTRL_SR_SEL_MASK;
vselmax = 64;
break;
+ default:
+ return -EINVAL;
}

/* multiplier 0 == 1 but 2,3 normal */
@@ -688,6 +690,9 @@ static int tps65910_set_voltage_dcdc(struct regulator_dev *dev,
case TPS65911_REG_VDDCTRL:
vsel = selector;
tps65910_reg_write(pmic, TPS65911_VDDCTRL_OP, vsel);
+ break;
+ default:
+ return -EINVAL;
}

return 0;
--
1.7.6


\
 
 \ /
  Last update: 2011-08-30 18:09    [W:0.089 / U:0.448 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site