[PATCH] video: tc358767: register aux i2c bus after validating link
Andrey Gusakov
andrey.gusakov at cogentembedded.com
Mon Mar 5 06:19:53 PST 2018
Register AUX i2c adapter only if AUX link is functional. This
should avoid possible hung during tc358767 probe when no display
connected.
Signed-off-by: Andrey Gusakov <andrey.gusakov at cogentembedded.com>
---
drivers/video/tc358767.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/video/tc358767.c b/drivers/video/tc358767.c
index f9ca06c..5ad5cb4 100644
--- a/drivers/video/tc358767.c
+++ b/drivers/video/tc358767.c
@@ -1404,6 +1404,10 @@ static int tc_probe(struct device_d *dev)
if (ret)
goto err;
+ ret = tc_get_display_props(tc);
+ if (ret)
+ goto err;
+
/* Register DP AUX channel */
tc->adapter.master_xfer = tc_aux_i2c_xfer;
tc->adapter.nr = -1; /* any free */
@@ -1416,10 +1420,6 @@ static int tc_probe(struct device_d *dev)
goto err;
}
- ret = tc_get_display_props(tc);
- if (ret)
- goto err;
-
/* add vlp */
tc->vpl.node = dev->device_node;
tc->vpl.ioctl = tc_ioctl;
--
1.9.1
More information about the barebox
mailing list