@@ -1008,17 +1008,6 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
return -ENODEV;
}
- /* Register aux channel */
- anx78xx->aux.name = "DP-AUX";
- anx78xx->aux.dev = &anx78xx->client->dev;
- anx78xx->aux.transfer = anx78xx_aux_transfer;
-
- err = drm_dp_aux_register(&anx78xx->aux);
- if (err < 0) {
- DRM_ERROR("Failed to register aux channel: %d\n", err);
- return err;
- }
-
err = drm_connector_init(bridge->dev, &anx78xx->connector,
&anx78xx_connector_funcs,
DRM_MODE_CONNECTOR_DisplayPort);
@@ -1038,6 +1027,17 @@ static int anx78xx_bridge_attach(struct drm_bridge *bridge)
anx78xx->connector.polled = DRM_CONNECTOR_POLL_HPD;
+ /* Register aux channel */
+ anx78xx->aux.name = "DP-AUX";
+ anx78xx->aux.dev = anx78xx->connector.kdev;
+ anx78xx->aux.transfer = anx78xx_aux_transfer;
+
+ err = drm_dp_aux_register(&anx78xx->aux);
+ if (err < 0) {
+ DRM_ERROR("Failed to register aux channel: %d\n", err);
+ return err;
+ }
+
err = drm_connector_attach_encoder(&anx78xx->connector,
bridge->encoder);
if (err) {