@@ -1768,7 +1768,7 @@ static int exynos_dsi_bind(struct device *dev, struct device *master,
if (ret)
return ret;
- return mipi_dsi_host_register(&dsi->dsi_host);
+ return 0;
}
static void exynos_dsi_unbind(struct device *dev, struct device *master,
@@ -1779,8 +1779,6 @@ static void exynos_dsi_unbind(struct device *dev, struct device *master,
exynos_dsi_disable(dsi);
__exynos_dsi_remove(dsi);
-
- mipi_dsi_host_unregister(&dsi->dsi_host);
}
static const struct component_ops exynos_dsi_component_ops = {
@@ -1878,6 +1876,10 @@ static struct exynos_dsi *__exynos_dsi_probe(struct platform_device *pdev)
pm_runtime_enable(dev);
+ ret = mipi_dsi_host_register(&dsi->dsi_host);
+ if (ret)
+ return ERR_PTR(ret);
+
bridge = &dsi->bridge;
bridge->driver_private = dsi;
bridge->funcs = &exynos_dsi_bridge_funcs;
@@ -1892,6 +1894,8 @@ static void __exynos_dsi_remove(struct exynos_dsi *dsi)
{
drm_bridge_remove(&dsi->bridge);
+ mipi_dsi_host_unregister(&dsi->dsi_host);
+
pm_runtime_disable(dsi->dev);
}
The bind/unbind API will be only used with the component framework, but the mipi dsi host is always required. Therefore, move it to the shared probe helper function. Signed-off-by: Michael Tretter <m.tretter@pengutronix.de> --- drivers/gpu/drm/exynos/exynos_drm_dsi.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-)