Skip to content

Commit

Permalink
drm/imx: imx-ldb: use local connector variable
Browse files Browse the repository at this point in the history
Use a local variable for the connector.
This simplifies the following commits.

Signed-off-by: Philipp Zabel <[email protected]>
Acked-by: Daniel Vetter <[email protected]>
  • Loading branch information
pH5 committed Jan 4, 2021
1 parent c805ec7 commit bed00dd
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions drivers/gpu/drm/imx/imx-ldb.c
Original file line number Diff line number Diff line change
@@ -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;

0 comments on commit bed00dd

Please sign in to comment.