[PATCH 1/1 v2] drm/rockchip: dw-mipi-dsi: fix possible un-balanced runtime PM enable

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Thanks, pushed to drm-misc-fixes.

? 2017/11/15 16:24, Mirza Krak ??:
> 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 <mirza.krak at endian.se>
> ---
>
> Changes in v2:
> - typos in commit message
>
> ? drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 3 +--
> ? 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> index 9a20b9d..f7fc652 100644
> --- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> +++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
> @@ -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:
>





[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux