From: Axel Lin <axel.lin@gmail.com>
Date: Thu, 14 Jun 2012 02:22:59 +0000 (+0800)
Subject: regulator: tps65023: Set n_voltages to 1 for fixed voltage
X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=ec0ab07587f0d2af208366158f5fd487311f1c56;p=GitHub%2Fexynos8895%2Fandroid_kernel_samsung_universal8895.git

regulator: tps65023: Set n_voltages to 1 for fixed voltage

For fixed voltage, the n_voltages should be 1 rather than 0.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
---

diff --git a/drivers/regulator/tps65023-regulator.c b/drivers/regulator/tps65023-regulator.c
index f841bd0db6aa..df8b70d76f9e 100644
--- a/drivers/regulator/tps65023-regulator.c
+++ b/drivers/regulator/tps65023-regulator.c
@@ -324,7 +324,10 @@ static int __devinit tps_65023_probe(struct i2c_client *client,
 
 		tps->desc[i].name = info->name;
 		tps->desc[i].id = i;
-		tps->desc[i].n_voltages = info->table_len;
+		if (info->fixed)
+			tps->desc[i].n_voltages = 1;
+		else
+			tps->desc[i].n_voltages = info->table_len;
 		tps->desc[i].ops = (i > TPS65023_DCDC_3 ?
 					&tps65023_ldo_ops : &tps65023_dcdc_ops);
 		tps->desc[i].type = REGULATOR_VOLTAGE;