Skip to content

Commit

Permalink
video: fbdev: omap2: Remove deprecated regulator_can_change_voltage()…
Browse files Browse the repository at this point in the history
… usage

regulator_can_change_voltage() is deprecated and it's use is not necessary
as commit:
6a0028b regulator: Deprecate regulator_can_change_voltage()
describers it clearly.
As there is no practical use of it it can be removed.
At this point the regulator_set_voltage() calls can not be removed as the
DT data need to be fixed first.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@ti.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
  • Loading branch information
Peter Ujfalusi authored and Tomi Valkeinen committed Apr 29, 2016
1 parent c3b46c7 commit 9b4639b
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
12 changes: 5 additions & 7 deletions drivers/video/fbdev/omap2/omapfb/dss/dsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -1180,13 +1180,11 @@ static int dsi_regulator_init(struct platform_device *dsidev)
return PTR_ERR(vdds_dsi);
}

if (regulator_can_change_voltage(vdds_dsi)) {
r = regulator_set_voltage(vdds_dsi, 1800000, 1800000);
if (r) {
devm_regulator_put(vdds_dsi);
DSSERR("can't set the DSI regulator voltage\n");
return r;
}
r = regulator_set_voltage(vdds_dsi, 1800000, 1800000);
if (r) {
devm_regulator_put(vdds_dsi);
DSSERR("can't set the DSI regulator voltage\n");
return r;
}

dsi->vdds_dsi_reg = vdds_dsi;
Expand Down
12 changes: 5 additions & 7 deletions drivers/video/fbdev/omap2/omapfb/dss/hdmi4.c
Original file line number Diff line number Diff line change
Expand Up @@ -114,13 +114,11 @@ static int hdmi_init_regulator(void)
return PTR_ERR(reg);
}

if (regulator_can_change_voltage(reg)) {
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}

hdmi.vdda_reg = reg;
Expand Down
12 changes: 5 additions & 7 deletions drivers/video/fbdev/omap2/omapfb/dss/hdmi5.c
Original file line number Diff line number Diff line change
Expand Up @@ -131,13 +131,11 @@ static int hdmi_init_regulator(void)
return PTR_ERR(reg);
}

if (regulator_can_change_voltage(reg)) {
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}
r = regulator_set_voltage(reg, 1800000, 1800000);
if (r) {
devm_regulator_put(reg);
DSSWARN("can't set the regulator voltage\n");
return r;
}

hdmi.vdda_reg = reg;
Expand Down

0 comments on commit 9b4639b

Please sign in to comment.