Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 312519
b: refs/heads/master
c: 1acb645
h: refs/heads/master
i:
  312517: e6fd41b
  312515: 7a00aaa
  312511: 663a7a1
v: v3
  • Loading branch information
Axel Lin authored and Mark Brown committed Jun 7, 2012
1 parent 075b8b2 commit 3da2a63
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: ee3ed6effd8cc4c0cbfa35307cfc5fcec75b5e12
refs/heads/master: 1acb645ebfe3a008e3c3350918d7d29974b1eaec
14 changes: 3 additions & 11 deletions trunk/drivers/regulator/rc5t583-regulator.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,18 +70,10 @@ static int rc5t583_set_voltage_time_sel(struct regulator_dev *rdev,
unsigned int old_selector, unsigned int new_selector)
{
struct rc5t583_regulator *reg = rdev_get_drvdata(rdev);
int old_uV, new_uV;
old_uV = regulator_list_voltage_linear(rdev, old_selector);

if (old_uV < 0)
return old_uV;

new_uV = regulator_list_voltage_linear(rdev, new_selector);
if (new_uV < 0)
return new_uV;

return DIV_ROUND_UP(abs(old_uV - new_uV),
reg->reg_info->change_uv_per_us);
return DIV_ROUND_UP(abs(new_selector - old_selector) *
rdev->desc->uV_step,
reg->reg_info->change_uv_per_us);
}


Expand Down

0 comments on commit 3da2a63

Please sign in to comment.