summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRahul T R <r-ravikumar@ti.com>2022-07-11 21:42:44 +0530
committerVignesh Raghavendra <vigneshr@ti.com>2022-07-13 19:46:11 +0530
commitce02258b7649c4d73a09efc50006f360e2c1d451 (patch)
tree613c24372d8e3d93c46ba64bdadbf84399eef030
parent68c5ef2863070c34fb98d5046fe09eeba5dc63a1 (diff)
drm/bridge: ti-sn65dsi86: Return probe deffer in finding dsi host
Move finding dsi host to a earlier stage in the probe and return EPROBE_DEFFER in case dsi host is not probed yet Signed-off-by: Rahul T R <r-ravikumar@ti.com> Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--drivers/gpu/drm/bridge/ti-sn65dsi86.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/bridge/ti-sn65dsi86.c b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
index 4f6eeda4c901..fe11db551896 100644
--- a/drivers/gpu/drm/bridge/ti-sn65dsi86.c
+++ b/drivers/gpu/drm/bridge/ti-sn65dsi86.c
@@ -1172,6 +1172,12 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
if (ret)
return ret;
+ host = of_find_mipi_dsi_host_by_node(pdata->host_node);
+ if (!host) {
+ DRM_ERROR("failed to find dsi host\n");
+ return -EPROBE_DEFER;
+ }
+
pm_runtime_enable(pdata->dev);
ret = ti_sn_setup_gpio_controller(pdata);
@@ -1195,12 +1201,6 @@ static int ti_sn_bridge_probe(struct i2c_client *client,
/*
* Attach to DSI host.
*/
- host = of_find_mipi_dsi_host_by_node(pdata->host_node);
- if (!host) {
- DRM_ERROR("failed to find dsi host\n");
- return -ENODEV;
- }
-
dsi = mipi_dsi_device_register_full(host, &info);
if (IS_ERR(dsi)) {
DRM_ERROR("failed to create dsi device\n");