exynos4-is: Do not unnecessarily activate fimc-is device in probe()
authorSylwester Nawrocki <s.nawrocki@samsung.com>
Thu, 12 Sep 2013 16:49:09 +0000 (18:49 +0200)
committerChanho Park <chanho61.park@samsung.com>
Tue, 18 Nov 2014 02:44:44 +0000 (11:44 +0900)
There is no use of temporarily activating the device in probe()
so remove the pm_runtime_get_sync(), pm_runtime_put() calls.
This also fixes a bug on error path.

Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
drivers/media/platform/exynos4-is/fimc-is.c

index 5d3586d..fc4fda3 100644 (file)
@@ -824,11 +824,6 @@ static int fimc_is_probe(struct platform_device *pdev)
                dev_err(dev, "irq request failed\n");
                goto err_clk;
        }
-       pm_runtime_enable(dev);
-
-       ret = pm_runtime_get_sync(dev);
-       if (ret < 0)
-               goto err_irq;
 
        is->alloc_ctx = vb2_dma_contig_init_ctx(dev);
        if (IS_ERR(is->alloc_ctx)) {
@@ -851,7 +846,7 @@ static int fimc_is_probe(struct platform_device *pdev)
        if (ret < 0)
                goto err_dfs;
 
-       pm_runtime_put_sync(dev);
+       pm_runtime_enable(dev);
 
        dev_dbg(dev, "FIMC-IS registered successfully\n");
        return 0;