diff options
Diffstat (limited to 'drivers/media/platform/omap3isp/ispccp2.c')
-rw-r--r-- | drivers/media/platform/omap3isp/ispccp2.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/drivers/media/platform/omap3isp/ispccp2.c b/drivers/media/platform/omap3isp/ispccp2.c index 85f0de8..c5d84c9 100644 --- a/drivers/media/platform/omap3isp/ispccp2.c +++ b/drivers/media/platform/omap3isp/ispccp2.c @@ -1136,7 +1136,7 @@ int omap3isp_ccp2_init(struct isp_device *isp) * TODO: Don't hardcode the usage of PHY1 (shared with CSI2c). */ if (isp->revision == ISP_REVISION_2_0) { - ccp2->vdds_csib = regulator_get(isp->dev, "vdds_csib"); + ccp2->vdds_csib = devm_regulator_get(isp->dev, "vdds_csib"); if (IS_ERR(ccp2->vdds_csib)) { dev_dbg(isp->dev, "Could not get regulator vdds_csib\n"); @@ -1147,10 +1147,8 @@ int omap3isp_ccp2_init(struct isp_device *isp) } ret = ccp2_init_entities(ccp2); - if (ret < 0) { - regulator_put(ccp2->vdds_csib); + if (ret < 0) return ret; - } ccp2_reset(ccp2); return 0; @@ -1166,6 +1164,4 @@ void omap3isp_ccp2_cleanup(struct isp_device *isp) omap3isp_video_cleanup(&ccp2->video_in); media_entity_cleanup(&ccp2->subdev.entity); - - regulator_put(ccp2->vdds_csib); } |