OSDN Git Service

media: exynos4-is: add missed clk_disable_unprepare in remove
authorChuhong Yuan <hslester96@gmail.com>
Thu, 19 Dec 2019 07:48:24 +0000 (08:48 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 15:39:58 +0000 (16:39 +0100)
This driver forgets to disable and unprepare clock when remove.
Add a call to clk_disable_unprepare() to fix it.

Signed-off-by: Chuhong Yuan <hslester96@gmail.com>
Reviewed-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
drivers/media/platform/exynos4-is/fimc-lite.c

index e87c6a0..17de14f 100644 (file)
@@ -1614,6 +1614,9 @@ static int fimc_lite_remove(struct platform_device *pdev)
        struct fimc_lite *fimc = platform_get_drvdata(pdev);
        struct device *dev = &pdev->dev;
 
+       if (!pm_runtime_enabled(dev))
+               clk_disable_unprepare(fimc->clock);
+
        pm_runtime_disable(dev);
        pm_runtime_set_suspended(dev);
        fimc_lite_unregister_capture_subdev(fimc);