diff options
Diffstat (limited to 'drivers/regulator/tps6586x-regulator.c')
-rw-r--r-- | drivers/regulator/tps6586x-regulator.c | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/drivers/regulator/tps6586x-regulator.c b/drivers/regulator/tps6586x-regulator.c index e68382d0e1ea..d8fa37d5c734 100644 --- a/drivers/regulator/tps6586x-regulator.c +++ b/drivers/regulator/tps6586x-regulator.c @@ -70,6 +70,7 @@ static inline struct device *to_tps6586x_dev(struct regulator_dev *rdev) static struct regulator_ops tps6586x_regulator_ops = { .list_voltage = regulator_list_voltage_table, + .map_voltage = regulator_map_voltage_ascend, .get_voltage_sel = regulator_get_voltage_sel_regmap, .set_voltage_sel = regulator_set_voltage_sel_regmap, @@ -245,7 +246,7 @@ static int tps6586x_regulator_set_slew_rate(struct platform_device *pdev, reg = TPS6586X_SM1SL; break; default: - dev_warn(&pdev->dev, "Only SM0/SM1 can set slew rate\n"); + dev_err(&pdev->dev, "Only SM0/SM1 can set slew rate\n"); return -EINVAL; } @@ -304,14 +305,12 @@ static struct tps6586x_platform_data *tps6586x_parse_regulator_dt( } err = of_regulator_match(&pdev->dev, regs, tps6586x_matches, num); + of_node_put(regs); if (err < 0) { dev_err(&pdev->dev, "Regulator match failed, e %d\n", err); - of_node_put(regs); return NULL; } - of_node_put(regs); - pdata = devm_kzalloc(&pdev->dev, sizeof(*pdata), GFP_KERNEL); if (!pdata) { dev_err(&pdev->dev, "Memory alloction failed\n"); |