Skip to content

Commit

Permalink
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel…
Browse files Browse the repository at this point in the history
…/git/lrg/voltage-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
  regulator: max8649 - fix setting extclk_freq
  regulator: fix typo in current units
  regulator: fix device_register() error handling
  • Loading branch information
Linus Torvalds committed Oct 4, 2010
2 parents 3c06806 + 0f69c89 commit 2f6b3aa
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions drivers/regulator/core.c
Original file line number Diff line number Diff line change
Expand Up @@ -700,7 +700,7 @@ static void print_constraints(struct regulator_dev *rdev)
constraints->min_uA != constraints->max_uA) {
ret = _regulator_get_current_limit(rdev);
if (ret > 0)
count += sprintf(buf + count, "at %d uA ", ret / 1000);
count += sprintf(buf + count, "at %d mA ", ret / 1000);
}

if (constraints->valid_modes_mask & REGULATOR_MODE_FAST)
Expand Down Expand Up @@ -2302,8 +2302,10 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
dev_set_name(&rdev->dev, "regulator.%d",
atomic_inc_return(&regulator_no) - 1);
ret = device_register(&rdev->dev);
if (ret != 0)
if (ret != 0) {
put_device(&rdev->dev);
goto clean;
}

dev_set_drvdata(&rdev->dev, rdev);

Expand Down
2 changes: 1 addition & 1 deletion drivers/regulator/max8649.c
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
/* set external clock frequency */
info->extclk_freq = pdata->extclk_freq;
max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
info->extclk_freq);
info->extclk_freq << 6);
}

if (pdata->ramp_timing) {
Expand Down

0 comments on commit 2f6b3aa

Please sign in to comment.