Skip to content

Commit 2f6b3aa

Browse files
committed
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
2 parents 3c06806 + 0f69c89 commit 2f6b3aa

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

drivers/regulator/core.c

+4-2
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ static void print_constraints(struct regulator_dev *rdev)
700700
constraints->min_uA != constraints->max_uA) {
701701
ret = _regulator_get_current_limit(rdev);
702702
if (ret > 0)
703-
count += sprintf(buf + count, "at %d uA ", ret / 1000);
703+
count += sprintf(buf + count, "at %d mA ", ret / 1000);
704704
}
705705

706706
if (constraints->valid_modes_mask & REGULATOR_MODE_FAST)
@@ -2302,8 +2302,10 @@ struct regulator_dev *regulator_register(struct regulator_desc *regulator_desc,
23022302
dev_set_name(&rdev->dev, "regulator.%d",
23032303
atomic_inc_return(&regulator_no) - 1);
23042304
ret = device_register(&rdev->dev);
2305-
if (ret != 0)
2305+
if (ret != 0) {
2306+
put_device(&rdev->dev);
23062307
goto clean;
2308+
}
23072309

23082310
dev_set_drvdata(&rdev->dev, rdev);
23092311

drivers/regulator/max8649.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -330,7 +330,7 @@ static int __devinit max8649_regulator_probe(struct i2c_client *client,
330330
/* set external clock frequency */
331331
info->extclk_freq = pdata->extclk_freq;
332332
max8649_set_bits(info->i2c, MAX8649_SYNC, MAX8649_EXT_MASK,
333-
info->extclk_freq);
333+
info->extclk_freq << 6);
334334
}
335335

336336
if (pdata->ramp_timing) {

0 commit comments

Comments
 (0)