media: rockchip/vpu: Add missing dont_use_autosuspend() calls
authorJonas Karlman <jonas@kwiboo.se>
Thu, 25 Apr 2019 07:12:28 +0000 (03:12 -0400)
committerMauro Carvalho Chehab <mchehab+samsung@kernel.org>
Wed, 15 May 2019 09:37:58 +0000 (05:37 -0400)
Those calls are needed to restore a clean PM state when the probe fails
or when the driver is unloaded such that future ->probe() calls can
initialize runtime PM again.

Signed-off-by: Jonas Karlman <jonas@kwiboo.se>
Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c

index c00e2b47d5c17a810e9f814bd75efda5dad3412e..b25e93daafde49361235419f96c73c94231228d7 100644 (file)
@@ -489,6 +489,7 @@ err_v4l2_unreg:
        v4l2_device_unregister(&vpu->v4l2_dev);
 err_clk_unprepare:
        clk_bulk_unprepare(vpu->variant->num_clocks, vpu->clocks);
+       pm_runtime_dont_use_autosuspend(vpu->dev);
        pm_runtime_disable(vpu->dev);
        return ret;
 }
@@ -509,6 +510,7 @@ static int rockchip_vpu_remove(struct platform_device *pdev)
        }
        v4l2_device_unregister(&vpu->v4l2_dev);
        clk_bulk_unprepare(vpu->variant->num_clocks, vpu->clocks);
+       pm_runtime_dont_use_autosuspend(vpu->dev);
        pm_runtime_disable(vpu->dev);
        return 0;
 }