diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-12-10 16:38:33 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2021-01-04 12:59:33 +0100 |
commit | bed00ddedf0d73b2541d8d9c9dd1f8f36092f106 (patch) | |
tree | 0fb55d2cfc412f158a9c902366e24339925f450d /drivers | |
parent | c805ec7eb21034008da764e9401f791f6ea86506 (diff) | |
download | linux-bed00ddedf0d73b2541d8d9c9dd1f8f36092f106.tar.bz2 |
drm/imx: imx-ldb: use local connector variable
Use a local variable for the connector.
This simplifies the following commits.
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/gpu/drm/imx/imx-ldb.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/imx/imx-ldb.c b/drivers/gpu/drm/imx/imx-ldb.c index 41e2978cb1eb..288a81f134fe 100644 --- a/drivers/gpu/drm/imx/imx-ldb.c +++ b/drivers/gpu/drm/imx/imx-ldb.c @@ -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; |