diff options
author | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-01-24 16:17:06 -0500 |
commit | e92427b289d252cfbd4cb5282d92f4ce1a5bb1fb (patch) | |
tree | 6d30e5e7b7f8e9aaa51d43b7128ac56860fa03bb /drivers/regulator/max8925-regulator.c | |
parent | c506653d35249bb4738bb139c24362e1ae724bc1 (diff) | |
parent | ec30f343d61391ab23705e50a525da1d55395780 (diff) |
Merge branch 'master' of master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6
Diffstat (limited to 'drivers/regulator/max8925-regulator.c')
-rw-r--r-- | drivers/regulator/max8925-regulator.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/regulator/max8925-regulator.c b/drivers/regulator/max8925-regulator.c index 552cad85ae5a..8ae147549c6a 100644 --- a/drivers/regulator/max8925-regulator.c +++ b/drivers/regulator/max8925-regulator.c | |||
@@ -55,7 +55,7 @@ static int max8925_list_voltage(struct regulator_dev *rdev, unsigned index) | |||
55 | } | 55 | } |
56 | 56 | ||
57 | static int max8925_set_voltage(struct regulator_dev *rdev, | 57 | static int max8925_set_voltage(struct regulator_dev *rdev, |
58 | int min_uV, int max_uV) | 58 | int min_uV, int max_uV, unsigned int *selector) |
59 | { | 59 | { |
60 | struct max8925_regulator_info *info = rdev_get_drvdata(rdev); | 60 | struct max8925_regulator_info *info = rdev_get_drvdata(rdev); |
61 | unsigned char data, mask; | 61 | unsigned char data, mask; |
@@ -66,6 +66,7 @@ static int max8925_set_voltage(struct regulator_dev *rdev, | |||
66 | return -EINVAL; | 66 | return -EINVAL; |
67 | } | 67 | } |
68 | data = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; | 68 | data = (min_uV - info->min_uV + info->step_uV - 1) / info->step_uV; |
69 | *selector = data; | ||
69 | data <<= info->vol_shift; | 70 | data <<= info->vol_shift; |
70 | mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; | 71 | mask = ((1 << info->vol_nbits) - 1) << info->vol_shift; |
71 | 72 | ||