Commit 51930bba authored by Tomi Valkeinen's avatar Tomi Valkeinen

OMAPDSS: CORE: use devm_regulator_get

Use devm_regulator_get() instead of regulator_get() to simplify code.
Signed-off-by: default avatarTomi Valkeinen <tomi.valkeinen@ti.com>
parent a7e71e7f
...@@ -88,7 +88,7 @@ struct regulator *dss_get_vdds_dsi(void) ...@@ -88,7 +88,7 @@ struct regulator *dss_get_vdds_dsi(void)
if (core.vdds_dsi_reg != NULL) if (core.vdds_dsi_reg != NULL)
return core.vdds_dsi_reg; return core.vdds_dsi_reg;
reg = regulator_get(&core.pdev->dev, "vdds_dsi"); reg = devm_regulator_get(&core.pdev->dev, "vdds_dsi");
if (!IS_ERR(reg)) if (!IS_ERR(reg))
core.vdds_dsi_reg = reg; core.vdds_dsi_reg = reg;
...@@ -102,7 +102,7 @@ struct regulator *dss_get_vdds_sdi(void) ...@@ -102,7 +102,7 @@ struct regulator *dss_get_vdds_sdi(void)
if (core.vdds_sdi_reg != NULL) if (core.vdds_sdi_reg != NULL)
return core.vdds_sdi_reg; return core.vdds_sdi_reg;
reg = regulator_get(&core.pdev->dev, "vdds_sdi"); reg = devm_regulator_get(&core.pdev->dev, "vdds_sdi");
if (!IS_ERR(reg)) if (!IS_ERR(reg))
core.vdds_sdi_reg = reg; core.vdds_sdi_reg = reg;
...@@ -664,16 +664,6 @@ static int __init omap_dss_init(void) ...@@ -664,16 +664,6 @@ static int __init omap_dss_init(void)
static void __exit omap_dss_exit(void) static void __exit omap_dss_exit(void)
{ {
if (core.vdds_dsi_reg != NULL) {
regulator_put(core.vdds_dsi_reg);
core.vdds_dsi_reg = NULL;
}
if (core.vdds_sdi_reg != NULL) {
regulator_put(core.vdds_sdi_reg);
core.vdds_sdi_reg = NULL;
}
omap_dss_unregister_drivers(); omap_dss_unregister_drivers();
omap_dss_bus_unregister(); omap_dss_bus_unregister();
......
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