From: Sylwester Nawrocki Date: Fri, 31 May 2013 14:37:21 +0000 (-0300) Subject: [media] exynos4-is: Do not use asynchronous runtime PM in release fop X-Git-Tag: submit/tizen/20141121.110247~3648 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=3ffeac9f79f771f6a1d56667ec7706b54d287162;p=platform%2Fkernel%2Flinux-3.10.git [media] exynos4-is: Do not use asynchronous runtime PM in release fop Use pm_runtime_put_sync() instead of pm_runtime_put() to avoid races in handling the 'state' bit flags when the fimc-capture drivers' runtime_resume callback is called from the PM workqueue. Signed-off-by: Sylwester Nawrocki Signed-off-by: Kyungmin Park Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/platform/exynos4-is/fimc-capture.c b/drivers/media/platform/exynos4-is/fimc-capture.c index b6055d2..b2f9581 100644 --- a/drivers/media/platform/exynos4-is/fimc-capture.c +++ b/drivers/media/platform/exynos4-is/fimc-capture.c @@ -496,7 +496,7 @@ static int fimc_capture_open(struct file *file) ret = v4l2_fh_open(file); if (ret) { - pm_runtime_put(&fimc->pdev->dev); + pm_runtime_put_sync(&fimc->pdev->dev); goto unlock; } @@ -564,7 +564,7 @@ static int fimc_capture_release(struct file *file) fimc_md_graph_unlock(&vc->ve); } - pm_runtime_put(&fimc->pdev->dev); + pm_runtime_put_sync(&fimc->pdev->dev); mutex_unlock(&fimc->lock); return ret;