Skip to content

Commit c7b5128

Browse files
committed
Merge branch 'regulator-5.1' into regulator-linus
2 parents e93c9c9 + 734008e commit c7b5128

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

drivers/regulator/core.c

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2256,6 +2256,7 @@ static void regulator_ena_gpio_free(struct regulator_dev *rdev)
22562256
if (pin->gpiod == rdev->ena_pin->gpiod) {
22572257
if (pin->request_count <= 1) {
22582258
pin->request_count = 0;
2259+
gpiod_put(pin->gpiod);
22592260
list_del(&pin->list);
22602261
kfree(pin);
22612262
rdev->ena_pin = NULL;
@@ -3322,15 +3323,12 @@ static int regulator_set_voltage_unlocked(struct regulator *regulator,
33223323

33233324
/* for not coupled regulators this will just set the voltage */
33243325
ret = regulator_balance_voltage(rdev, state);
3325-
if (ret < 0)
3326-
goto out2;
3326+
if (ret < 0) {
3327+
voltage->min_uV = old_min_uV;
3328+
voltage->max_uV = old_max_uV;
3329+
}
33273330

33283331
out:
3329-
return 0;
3330-
out2:
3331-
voltage->min_uV = old_min_uV;
3332-
voltage->max_uV = old_max_uV;
3333-
33343332
return ret;
33353333
}
33363334

@@ -5064,10 +5062,11 @@ void regulator_unregister(struct regulator_dev *rdev)
50645062
regulator_put(rdev->supply);
50655063
}
50665064

5065+
flush_work(&rdev->disable_work.work);
5066+
50675067
mutex_lock(&regulator_list_mutex);
50685068

50695069
debugfs_remove_recursive(rdev->debugfs);
5070-
flush_work(&rdev->disable_work.work);
50715070
WARN_ON(rdev->open_count);
50725071
regulator_remove_coupling(rdev);
50735072
unset_regulator_supplies(rdev);

drivers/regulator/max77620-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -803,7 +803,7 @@ static int max77620_regulator_probe(struct platform_device *pdev)
803803
continue;
804804

805805
rdesc = &rinfo[id].desc;
806-
pmic->rinfo[id] = &max77620_regs_info[id];
806+
pmic->rinfo[id] = &rinfo[id];
807807
pmic->enable_power_mode[id] = MAX77620_POWER_MODE_NORMAL;
808808
pmic->reg_pdata[id].active_fps_src = -1;
809809
pmic->reg_pdata[id].active_fps_pd_slot = -1;

drivers/regulator/tps65217-regulator.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ static const struct regulator_linear_range tps65217_uv1_ranges[] = {
6161
REGULATOR_LINEAR_RANGE(1550000, 25, 30, 50000),
6262
REGULATOR_LINEAR_RANGE(1850000, 31, 52, 50000),
6363
REGULATOR_LINEAR_RANGE(3000000, 53, 55, 100000),
64-
REGULATOR_LINEAR_RANGE(3300000, 56, 62, 0),
64+
REGULATOR_LINEAR_RANGE(3300000, 56, 63, 0),
6565
};
6666

6767
static const struct regulator_linear_range tps65217_uv2_ranges[] = {

0 commit comments

Comments
 (0)