diff options
author | Dave Airlie <airlied@redhat.com> | 2010-09-24 01:37:33 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-09-24 01:37:33 -0400 |
commit | 4a445f291ac3faa08f56eaeb6e44856b6b72b74c (patch) | |
tree | b66cc93311dc4c623113a87aa9b40730a21ac18e /drivers/regulator/max1586.c | |
parent | cbc60ca04b342a4e1f2a1086a7277c077f07dbed (diff) | |
parent | a850ea30374ebed32a0724742601861853fde869 (diff) |
Merge remote branch 'origin/master' of /home/airlied/kernel//linux-2.6 into drm-core-next
Diffstat (limited to 'drivers/regulator/max1586.c')
-rw-r--r-- | drivers/regulator/max1586.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/regulator/max1586.c b/drivers/regulator/max1586.c index 8867c2710a6d..559cfa271a44 100644 --- a/drivers/regulator/max1586.c +++ b/drivers/regulator/max1586.c | |||
@@ -121,14 +121,14 @@ static int max1586_v6_set(struct regulator_dev *rdev, int min_uV, int max_uV) | |||
121 | if (max_uV < MAX1586_V6_MIN_UV || max_uV > MAX1586_V6_MAX_UV) | 121 | if (max_uV < MAX1586_V6_MIN_UV || max_uV > MAX1586_V6_MAX_UV) |
122 | return -EINVAL; | 122 | return -EINVAL; |
123 | 123 | ||
124 | if (min_uV >= 3000000) | ||
125 | selector = 3; | ||
126 | if (min_uV < 3000000) | ||
127 | selector = 2; | ||
128 | if (min_uV < 2500000) | ||
129 | selector = 1; | ||
130 | if (min_uV < 1800000) | 124 | if (min_uV < 1800000) |
131 | selector = 0; | 125 | selector = 0; |
126 | else if (min_uV < 2500000) | ||
127 | selector = 1; | ||
128 | else if (min_uV < 3000000) | ||
129 | selector = 2; | ||
130 | else if (min_uV >= 3000000) | ||
131 | selector = 3; | ||
132 | 132 | ||
133 | if (max1586_v6_calc_voltage(selector) > max_uV) | 133 | if (max1586_v6_calc_voltage(selector) > max_uV) |
134 | return -EINVAL; | 134 | return -EINVAL; |