Commit bed00dde authored by Philipp Zabel's avatar Philipp Zabel

drm/imx: imx-ldb: use local connector variable

Use a local variable for the connector.
This simplifies the following commits.
Signed-off-by: default avatarPhilipp Zabel <p.zabel@pengutronix.de>
Acked-by: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
parent c805ec7e
......@@ -411,6 +411,7 @@ static int imx_ldb_register(struct drm_device *drm,
struct imx_ldb_channel *imx_ldb_ch)
{
struct imx_ldb *ldb = imx_ldb_ch->ldb;
struct drm_connector *connector = &imx_ldb_ch->connector;
struct drm_encoder *encoder = &imx_ldb_ch->encoder;
int ret;
......@@ -432,8 +433,7 @@ static int imx_ldb_register(struct drm_device *drm,
drm_simple_encoder_init(drm, encoder, DRM_MODE_ENCODER_LVDS);
if (imx_ldb_ch->bridge) {
ret = drm_bridge_attach(&imx_ldb_ch->encoder,
imx_ldb_ch->bridge, NULL, 0);
ret = drm_bridge_attach(encoder, imx_ldb_ch->bridge, NULL, 0);
if (ret) {
DRM_ERROR("Failed to initialize bridge with drm\n");
return ret;
......@@ -445,13 +445,13 @@ static int imx_ldb_register(struct drm_device *drm,
* historical reasons, the ldb driver can also work without
* a panel.
*/
drm_connector_helper_add(&imx_ldb_ch->connector,
&imx_ldb_connector_helper_funcs);
drm_connector_init_with_ddc(drm, &imx_ldb_ch->connector,
drm_connector_helper_add(connector,
&imx_ldb_connector_helper_funcs);
drm_connector_init_with_ddc(drm, connector,
&imx_ldb_connector_funcs,
DRM_MODE_CONNECTOR_LVDS,
imx_ldb_ch->ddc);
drm_connector_attach_encoder(&imx_ldb_ch->connector, encoder);
drm_connector_attach_encoder(connector, encoder);
}
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