From: Jonas Karlman Date: Thu, 25 Apr 2019 07:12:28 +0000 (-0400) Subject: media: rockchip/vpu: Add missing dont_use_autosuspend() calls X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=5c5b90f5cbad77dc15d8b5582efdb2e362bcd710;p=openwrt%2Fstaging%2Fblogic.git media: rockchip/vpu: Add missing dont_use_autosuspend() calls 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 Signed-off-by: Boris Brezillon Signed-off-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c index c00e2b47d5c1..b25e93daafde 100644 --- a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c +++ b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c @@ -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; }