Commit a006c04e authored by Ulf Hansson's avatar Ulf Hansson Committed by Mauro Carvalho Chehab

[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: default avatarUlf Hansson <ulf.hansson@linaro.org>
Signed-off-by: default avatarMarek Szyprowski <m.szyprowski@samsung.com>
Tested-by: default avatarJavier Martinez Canillas <javier@osg.samsung.com>
Signed-off-by: default avatarSylwester Nawrocki <s.nawrocki@samsung.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@s-opensource.com>
parent 81aa8d14
...@@ -1095,12 +1095,15 @@ static int gsc_remove(struct platform_device *pdev) ...@@ -1095,12 +1095,15 @@ static int gsc_remove(struct platform_device *pdev)
{ {
struct gsc_dev *gsc = platform_get_drvdata(pdev); struct gsc_dev *gsc = platform_get_drvdata(pdev);
pm_runtime_get_sync(&pdev->dev);
gsc_unregister_m2m_device(gsc); gsc_unregister_m2m_device(gsc);
v4l2_device_unregister(&gsc->v4l2_dev); v4l2_device_unregister(&gsc->v4l2_dev);
vb2_dma_contig_clear_max_seg_size(&pdev->dev); vb2_dma_contig_clear_max_seg_size(&pdev->dev);
pm_runtime_disable(&pdev->dev); clk_disable_unprepare(gsc->clock);
clk_unprepare(gsc->clock);
pm_runtime_put_noidle(&pdev->dev);
dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name); dev_dbg(&pdev->dev, "%s driver unloaded\n", pdev->name);
return 0; return 0;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment