Commit d37801b3 authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: SDI: clean up regulator init

Clean up the SDI driver's regulator init to remove the (unused)
omap_dss_device parameter, renaming the function to a more sensible
name, and making the code slightly clearer.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent e25001d8
...@@ -248,13 +248,13 @@ void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs) ...@@ -248,13 +248,13 @@ void omapdss_sdi_set_datapairs(struct omap_dss_device *dssdev, int datapairs)
} }
EXPORT_SYMBOL(omapdss_sdi_set_datapairs); EXPORT_SYMBOL(omapdss_sdi_set_datapairs);
static int sdi_init_display(struct omap_dss_device *dssdev) static int sdi_init_regulator(void)
{ {
DSSDBG("SDI init\n");
if (sdi.vdds_sdi_reg == NULL) {
struct regulator *vdds_sdi; struct regulator *vdds_sdi;
if (sdi.vdds_sdi_reg)
return 0;
vdds_sdi = dss_get_vdds_sdi(); vdds_sdi = dss_get_vdds_sdi();
if (IS_ERR(vdds_sdi)) { if (IS_ERR(vdds_sdi)) {
...@@ -263,7 +263,6 @@ static int sdi_init_display(struct omap_dss_device *dssdev) ...@@ -263,7 +263,6 @@ static int sdi_init_display(struct omap_dss_device *dssdev)
} }
sdi.vdds_sdi_reg = vdds_sdi; sdi.vdds_sdi_reg = vdds_sdi;
}
return 0; return 0;
} }
...@@ -313,7 +312,7 @@ static int sdi_probe_pdata(struct platform_device *sdidev) ...@@ -313,7 +312,7 @@ static int sdi_probe_pdata(struct platform_device *sdidev)
dss_copy_device_pdata(dssdev, plat_dssdev); dss_copy_device_pdata(dssdev, plat_dssdev);
r = sdi_init_display(dssdev); r = sdi_init_regulator();
if (r) { if (r) {
DSSERR("device %s init failed: %d\n", dssdev->name, r); DSSERR("device %s init failed: %d\n", dssdev->name, r);
dss_put_device(dssdev); dss_put_device(dssdev);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment