]> Git Repo - linux.git/commitdiff
drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable
authorMirza Krak <[email protected]>
Wed, 15 Nov 2017 08:24:46 +0000 (08:24 +0000)
committerSandy Huang <[email protected]>
Mon, 27 Nov 2017 01:30:53 +0000 (09:30 +0800)
In the case where the bind gets deferred we would end up with a
un-balanced runtime PM enable call.

Fix this by simply moving the pm_runtime_enable call to the end of
the bind function when all paths have succeeded.

Signed-off-by: Mirza Krak <[email protected]>
Signed-off-by: Sandy Huang <[email protected]>
Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
drivers/gpu/drm/rockchip/dw-mipi-dsi.c

index 9a20b9dc27c834ab3d92a709dba64d0a4aec550e..f7fc652b00270302cffdf07740d5652e1f1ef3f4 100644 (file)
@@ -1275,8 +1275,6 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
                goto err_pllref;
        }
 
-       pm_runtime_enable(dev);
-
        dsi->dsi_host.ops = &dw_mipi_dsi_host_ops;
        dsi->dsi_host.dev = dev;
        ret = mipi_dsi_host_register(&dsi->dsi_host);
@@ -1291,6 +1289,7 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
        }
 
        dev_set_drvdata(dev, dsi);
+       pm_runtime_enable(dev);
        return 0;
 
 err_mipi_dsi_host:
This page took 0.063758 seconds and 4 git commands to generate.