summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/s5p-tv
diff options
context:
space:
mode:
authorSachin Kamat <sachin.kamat@linaro.org>2012-08-10 07:53:45 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-08-15 19:00:00 -0300
commit00d98c1bd6fe93de6db6a99ed25b4b7d96a402ec (patch)
tree2e9c4b4321905a2346f817ba22e0cb8f121ad7fd /drivers/media/platform/s5p-tv
parentd1bb4b29a74ea81b8282011479bc36417620b5fa (diff)
downloadblackbird-op-linux-00d98c1bd6fe93de6db6a99ed25b4b7d96a402ec.tar.gz
blackbird-op-linux-00d98c1bd6fe93de6db6a99ed25b4b7d96a402ec.zip
[media] s5p-tv: Use devm_regulator_get() in sdo_drv.c file
devm_regulator_get() is a device managed function and makes the exit code a bit simpler and cleaner. Signed-off-by: Sachin Kamat <sachin.kamat@linaro.org> Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/s5p-tv')
-rw-r--r--drivers/media/platform/s5p-tv/sdo_drv.c10
1 files changed, 3 insertions, 7 deletions
diff --git a/drivers/media/platform/s5p-tv/sdo_drv.c b/drivers/media/platform/s5p-tv/sdo_drv.c
index f6bca2c20e89..ad68bbed014e 100644
--- a/drivers/media/platform/s5p-tv/sdo_drv.c
+++ b/drivers/media/platform/s5p-tv/sdo_drv.c
@@ -374,15 +374,15 @@ static int __devinit sdo_probe(struct platform_device *pdev)
dev_info(dev, "fout_vpll.rate = %lu\n", clk_get_rate(sclk_vpll));
/* acquire regulator */
- sdev->vdac = regulator_get(dev, "vdd33a_dac");
+ sdev->vdac = devm_regulator_get(dev, "vdd33a_dac");
if (IS_ERR_OR_NULL(sdev->vdac)) {
dev_err(dev, "failed to get regulator 'vdac'\n");
goto fail_fout_vpll;
}
- sdev->vdet = regulator_get(dev, "vdet");
+ sdev->vdet = devm_regulator_get(dev, "vdet");
if (IS_ERR_OR_NULL(sdev->vdet)) {
dev_err(dev, "failed to get regulator 'vdet'\n");
- goto fail_vdac;
+ goto fail_fout_vpll;
}
/* enable gate for dac clock, because mixer uses it */
@@ -406,8 +406,6 @@ static int __devinit sdo_probe(struct platform_device *pdev)
dev_info(dev, "probe succeeded\n");
return 0;
-fail_vdac:
- regulator_put(sdev->vdac);
fail_fout_vpll:
clk_put(sdev->fout_vpll);
fail_dacphy:
@@ -428,8 +426,6 @@ static int __devexit sdo_remove(struct platform_device *pdev)
pm_runtime_disable(&pdev->dev);
clk_disable(sdev->dac);
- regulator_put(sdev->vdet);
- regulator_put(sdev->vdac);
clk_put(sdev->fout_vpll);
clk_put(sdev->dacphy);
clk_put(sdev->dac);
OpenPOWER on IntegriCloud