Commit 350fd554 authored by Andrzej Pietrasiewicz's avatar Andrzej Pietrasiewicz Committed by Neil Armstrong

drm/ast: Provide ddc symlink in connector sysfs directory

Use the ddc pointer provided by the generic connector.
Signed-off-by: default avatarAndrzej Pietrasiewicz <andrzej.p@collabora.com>
Reviewed-by: default avatarThomas Zimmermann <tzimmermann@suse.de>
Acked-by: default avatarSam Ravnborg <sam@ravnborg.org>
Reviewed-by: default avatarEmil Velikov <emil.velikov@collabora.com>
Signed-off-by: default avatarNeil Armstrong <narmstrong@baylibre.com>
Link: https://patchwork.freedesktop.org/patch/msgid/ff968add8074d109aeed02f0708edd85138246c3.1564161140.git.andrzej.p@collabora.com
parent 9572ae17
......@@ -867,7 +867,14 @@ static int ast_connector_init(struct drm_device *dev)
return -ENOMEM;
connector = &ast_connector->base;
drm_connector_init(dev, connector, &ast_connector_funcs, DRM_MODE_CONNECTOR_VGA);
ast_connector->i2c = ast_i2c_create(dev);
if (!ast_connector->i2c)
DRM_ERROR("failed to add ddc bus for connector\n");
drm_connector_init_with_ddc(dev, connector,
&ast_connector_funcs,
DRM_MODE_CONNECTOR_VGA,
&ast_connector->i2c->adapter);
drm_connector_helper_add(connector, &ast_connector_helper_funcs);
......@@ -881,10 +888,6 @@ static int ast_connector_init(struct drm_device *dev)
encoder = list_first_entry(&dev->mode_config.encoder_list, struct drm_encoder, head);
drm_connector_attach_encoder(connector, encoder);
ast_connector->i2c = ast_i2c_create(dev);
if (!ast_connector->i2c)
DRM_ERROR("failed to add ddc bus for connector\n");
return 0;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment