diff options
Diffstat (limited to 'drivers/media/platform/exynos4-is/fimc-lite.c')
-rw-r--r-- | drivers/media/platform/exynos4-is/fimc-lite.c | 17 |
1 files changed, 5 insertions, 12 deletions
diff --git a/drivers/media/platform/exynos4-is/fimc-lite.c b/drivers/media/platform/exynos4-is/fimc-lite.c index a0f149fb88e1..b91abf1c4d43 100644 --- a/drivers/media/platform/exynos4-is/fimc-lite.c +++ b/drivers/media/platform/exynos4-is/fimc-lite.c @@ -1432,6 +1432,7 @@ static int fimc_lite_create_capture_subdev(struct fimc_lite *fimc) sd->ctrl_handler = handler; sd->internal_ops = &fimc_lite_subdev_internal_ops; + sd->entity.function = MEDIA_ENT_F_PROC_VIDEO_SCALER; sd->entity.ops = &fimc_lite_subdev_media_ops; sd->owner = THIS_MODULE; v4l2_set_subdevdata(sd, fimc); @@ -1454,25 +1455,17 @@ static void fimc_lite_clk_put(struct fimc_lite *fimc) if (IS_ERR(fimc->clock)) return; - clk_unprepare(fimc->clock); clk_put(fimc->clock); fimc->clock = ERR_PTR(-EINVAL); } static int fimc_lite_clk_get(struct fimc_lite *fimc) { - int ret; - fimc->clock = clk_get(&fimc->pdev->dev, FLITE_CLK_NAME); if (IS_ERR(fimc->clock)) return PTR_ERR(fimc->clock); - ret = clk_prepare(fimc->clock); - if (ret < 0) { - clk_put(fimc->clock); - fimc->clock = ERR_PTR(-EINVAL); - } - return ret; + return 0; } static const struct of_device_id flite_of_match[]; @@ -1543,7 +1536,7 @@ static int fimc_lite_probe(struct platform_device *pdev) pm_runtime_enable(dev); if (!pm_runtime_enabled(dev)) { - ret = clk_enable(fimc->clock); + ret = clk_prepare_enable(fimc->clock); if (ret < 0) goto err_sd; } @@ -1568,7 +1561,7 @@ static int fimc_lite_runtime_resume(struct device *dev) { struct fimc_lite *fimc = dev_get_drvdata(dev); - clk_enable(fimc->clock); + clk_prepare_enable(fimc->clock); return 0; } @@ -1576,7 +1569,7 @@ static int fimc_lite_runtime_suspend(struct device *dev) { struct fimc_lite *fimc = dev_get_drvdata(dev); - clk_disable(fimc->clock); + clk_disable_unprepare(fimc->clock); return 0; } #endif |