diff options
author | Ulf Hansson <ulf.hansson@linaro.org> | 2016-11-09 15:23:54 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@s-opensource.com> | 2016-11-16 19:32:17 +0100 |
commit | a006c04e6218bb82c11888d9b99ef642bd64cf93 (patch) | |
tree | dc95b779be4dbaf97207a7a9ca2feeb7d07d7ed5 /drivers/media/platform/exynos-gsc | |
parent | [media] exynos-gsc: Make PM callbacks available conditionally (diff) | |
download | linux-a006c04e6218bb82c11888d9b99ef642bd64cf93.tar.xz linux-a006c04e6218bb82c11888d9b99ef642bd64cf93.zip |
[media] exynos-gsc: Fixup clock management at ->remove()
To make sure the clock is fully gated in ->remove(), we first need to
to bring the device into full power by invoking pm_runtime_get_sync().
Then, let's both unprepare and disable the clock.
[mszyprow: rebased onto v4.9-rc4]
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Tested-by: Javier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: Sylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
Diffstat (limited to 'drivers/media/platform/exynos-gsc')
-rw-r--r-- | drivers/media/platform/exynos-gsc/gsc-core.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/media/platform/exynos-gsc/gsc-core.c b/drivers/media/platform/exynos-gsc/gsc-core.c index 19fcbc7424fc..e62765328848 100644 --- a/drivers/media/platform/exynos-gsc/gsc-core.c +++ b/drivers/media/platform/exynos-gsc/gsc-core.c @@ -1095,12 +1095,15 @@ static int gsc_remove(struct platform_device *pdev) { struct gsc_dev *gsc = platform_get_drvdata(pdev); + pm_runtime_get_sync(&pdev->dev); + gsc_unregister_m2m_device(gsc); v4l2_device_unregister(&gsc->v4l2_dev); vb2_dma_contig_clear_max_seg_size(&pdev->dev); - pm_runtime_disable(&pdev->dev); - clk_unprepare(gsc->clock); + clk_disable_unprepare(gsc->clock); + + pm_runtime_put_noidle(&pdev->dev); dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name); return 0; |