@@ -306,19 +306,10 @@ static void ge_b850v3_lvds_remove(void)
306306 mutex_unlock (& ge_b850v3_lvds_dev_mutex );
307307}
308308
309- static int stdp4028_ge_b850v3_fw_probe (struct i2c_client * stdp4028_i2c ,
310- const struct i2c_device_id * id )
309+ static int ge_b850v3_register (void )
311310{
311+ struct i2c_client * stdp4028_i2c = ge_b850v3_lvds_ptr -> stdp4028_i2c ;
312312 struct device * dev = & stdp4028_i2c -> dev ;
313- int ret ;
314-
315- ret = ge_b850v3_lvds_init (dev );
316-
317- if (ret )
318- return ret ;
319-
320- ge_b850v3_lvds_ptr -> stdp4028_i2c = stdp4028_i2c ;
321- i2c_set_clientdata (stdp4028_i2c , ge_b850v3_lvds_ptr );
322313
323314 /* drm bridge initialization */
324315 ge_b850v3_lvds_ptr -> bridge .funcs = & ge_b850v3_lvds_funcs ;
@@ -343,6 +334,27 @@ static int stdp4028_ge_b850v3_fw_probe(struct i2c_client *stdp4028_i2c,
343334 "ge-b850v3-lvds-dp" , ge_b850v3_lvds_ptr );
344335}
345336
337+ static int stdp4028_ge_b850v3_fw_probe (struct i2c_client * stdp4028_i2c ,
338+ const struct i2c_device_id * id )
339+ {
340+ struct device * dev = & stdp4028_i2c -> dev ;
341+ int ret ;
342+
343+ ret = ge_b850v3_lvds_init (dev );
344+
345+ if (ret )
346+ return ret ;
347+
348+ ge_b850v3_lvds_ptr -> stdp4028_i2c = stdp4028_i2c ;
349+ i2c_set_clientdata (stdp4028_i2c , ge_b850v3_lvds_ptr );
350+
351+ /* Only register after both bridges are probed */
352+ if (!ge_b850v3_lvds_ptr -> stdp2690_i2c )
353+ return 0 ;
354+
355+ return ge_b850v3_register ();
356+ }
357+
346358static int stdp4028_ge_b850v3_fw_remove (struct i2c_client * stdp4028_i2c )
347359{
348360 ge_b850v3_lvds_remove ();
@@ -386,7 +398,11 @@ static int stdp2690_ge_b850v3_fw_probe(struct i2c_client *stdp2690_i2c,
386398 ge_b850v3_lvds_ptr -> stdp2690_i2c = stdp2690_i2c ;
387399 i2c_set_clientdata (stdp2690_i2c , ge_b850v3_lvds_ptr );
388400
389- return 0 ;
401+ /* Only register after both bridges are probed */
402+ if (!ge_b850v3_lvds_ptr -> stdp4028_i2c )
403+ return 0 ;
404+
405+ return ge_b850v3_register ();
390406}
391407
392408static int stdp2690_ge_b850v3_fw_remove (struct i2c_client * stdp2690_i2c )
0 commit comments