Browse Source

regulator: tps6524x: Fix get_voltage_sel for fixed voltage

get_voltage_sel() should return selector rather than voltage.

Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Axel Lin 13 years ago
parent
commit
8386a00f14
1 changed files with 1 additions and 1 deletions
  1. 1 1
      drivers/regulator/tps6524x-regulator.c

+ 1 - 1
drivers/regulator/tps6524x-regulator.c

@@ -482,7 +482,7 @@ static int get_voltage_sel(struct regulator_dev *rdev)
 	info	= &supply_info[rdev_get_id(rdev)];
 
 	if (info->flags & FIXED_VOLTAGE)
-		return info->fixed_voltage;
+		return 0;
 
 	ret = read_field(hw, &info->voltage);
 	if (ret < 0)