[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20180302175757.28192-2-enric.balletbo@collabora.com>
Date: Fri, 2 Mar 2018 18:57:53 +0100
From: Enric Balletbo i Serra <enric.balletbo@...labora.com>
To: Sandy Huang <hjc@...k-chips.com>,
Heiko Stübner <heiko@...ech.de>
Cc: Andrzej Hajda <a.hajda@...sung.com>,
linux-rockchip@...ts.infradead.org,
Archit Taneja <architt@...eaurora.org>,
linux-kernel@...r.kernel.org,
Russell King <rmk+kernel@...linux.org.uk>,
Neil Armstrong <narmstrong@...libre.com>,
dri-devel@...ts.freedesktop.org,
Jose Abreu <Jose.Abreu@...opsys.com>,
Hans Verkuil <hverkuil@...all.nl>,
Laurent Pinchart <Laurent.pinchart@...asonboard.com>,
Jernej Skrabec <jernej.skrabec@...l.net>,
linux-arm-kernel@...ts.infradead.org,
David Airlie <airlied@...ux.ie>,
Jeffy Chen <jeffy.chen@...k-chips.com>, kernel@...labora.com,
Enric Balletbo i Serra <enric.balletbo@...labora.com>
Subject: [PATCH v9 1/5] drm/rockchip: dw-mipi-dsi: Fix connector and encoder cleanup.
From: Jeffy Chen <jeffy.chen@...k-chips.com>
In bind()'s error handling path call destroy functions instead of
cleanup functions for encoder and connector and reorder to match how is
called in bind().
In unbind() call the connector and encoder destroy functions.
Signed-off-by: Jeffy Chen <jeffy.chen@...k-chips.com>
Signed-off-by: Thierry Escande <thierry.escande@...labora.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@...labora.com>
---
Changes in v9:
- Removed the pm_runtime_disable call as is not really needed.
drivers/gpu/drm/rockchip/dw-mipi-dsi.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
index 591953cbdd18..d53d5a09547f 100644
--- a/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
+++ b/drivers/gpu/drm/rockchip/dw-mipi-dsi.c
@@ -1302,8 +1302,8 @@ static int dw_mipi_dsi_bind(struct device *dev, struct device *master,
err_mipi_dsi_host:
mipi_dsi_host_unregister(&dsi->dsi_host);
err_cleanup:
- drm_encoder_cleanup(&dsi->encoder);
- drm_connector_cleanup(&dsi->connector);
+ dsi->connector.funcs->destroy(&dsi->connector);
+ dsi->encoder.funcs->destroy(&dsi->encoder);
err_pllref:
clk_disable_unprepare(dsi->pllref_clk);
return ret;
@@ -1316,6 +1316,10 @@ static void dw_mipi_dsi_unbind(struct device *dev, struct device *master,
mipi_dsi_host_unregister(&dsi->dsi_host);
pm_runtime_disable(dev);
+
+ dsi->connector.funcs->destroy(&dsi->connector);
+ dsi->encoder.funcs->destroy(&dsi->encoder);
+
clk_disable_unprepare(dsi->pllref_clk);
}
--
2.16.1
Powered by blists - more mailing lists