diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-04 20:35:48 (GMT) |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-10-04 20:35:48 (GMT) |
commit | 2f6b3aa7a563d05453c4d73ccf88191aee84333f (patch) | |
tree | 25e19592cc7f969005ffe46f8d250f55c103967b /drivers | |
parent | 3c06806e690885ce978ef180c8f8b6f8c17fb4b4 (diff) | |
parent | 0f69c897f378bf975c519b1d2455c03d06477dfa (diff) | |
download | linux-2f6b3aa7a563d05453c4d73ccf88191aee84333f.tar.xz |
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/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
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/regulator/core.c | 6 | ||||
-rw-r--r-- | drivers/regulator/max8649.c | 2 |
2 files changed, 5 insertions, 3 deletions
diff --git a/drivers/regulator/core.c b/drivers/regulator/core.c index 422a709..cc8b337 100644 --- a/drivers/regulator/core.c +++ b/drivers/regulator/core.c @@ -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) @@ -2302,8 +2302,10 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc, dev_set_name(&rdev->dev, "regulator.%d", atomic_inc_return(®ulator_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); diff --git a/drivers/regulator/max8649.c b/drivers/regulator/max8649.c index 4520ace..6b60a9c 100644 --- a/drivers/regulator/max8649.c +++ b/drivers/regulator/max8649.c @@ -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) { |