diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2020-12-10 16:38:35 +0100 |
---|---|---|
committer | Philipp Zabel <p.zabel@pengutronix.de> | 2021-01-04 12:59:33 +0100 |
commit | 396852df02b9ff49fe256ba459605fc680fe8d89 (patch) | |
tree | 166cada1d95860f85cb4a189def6d14fddda4c6d /drivers | |
parent | 8767f4711b2b742b641314e594f7c70b16fd73ec (diff) |
drm/imx: imx-tve: use local encoder and connector variables
Introduce local variables for encoder and 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-tve.c | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/drivers/gpu/drm/imx/imx-tve.c b/drivers/gpu/drm/imx/imx-tve.c index 2a8d2e32e7b4..37771073a525 100644 --- a/drivers/gpu/drm/imx/imx-tve.c +++ b/drivers/gpu/drm/imx/imx-tve.c @@ -430,27 +430,28 @@ static int tve_clk_init(struct imx_tve *tve, void __iomem *base) static int imx_tve_register(struct drm_device *drm, struct imx_tve *tve) { + struct drm_encoder *encoder = &tve->encoder; + struct drm_connector *connector = &tve->connector; int encoder_type; int ret; encoder_type = tve->mode == TVE_MODE_VGA ? DRM_MODE_ENCODER_DAC : DRM_MODE_ENCODER_TVDAC; - ret = imx_drm_encoder_parse_of(drm, &tve->encoder, tve->dev->of_node); + ret = imx_drm_encoder_parse_of(drm, encoder, tve->dev->of_node); if (ret) return ret; - drm_encoder_helper_add(&tve->encoder, &imx_tve_encoder_helper_funcs); - drm_simple_encoder_init(drm, &tve->encoder, encoder_type); + drm_encoder_helper_add(encoder, &imx_tve_encoder_helper_funcs); + drm_simple_encoder_init(drm, encoder, encoder_type); - drm_connector_helper_add(&tve->connector, - &imx_tve_connector_helper_funcs); - drm_connector_init_with_ddc(drm, &tve->connector, + drm_connector_helper_add(connector, &imx_tve_connector_helper_funcs); + drm_connector_init_with_ddc(drm, connector, &imx_tve_connector_funcs, DRM_MODE_CONNECTOR_VGA, tve->ddc); - drm_connector_attach_encoder(&tve->connector, &tve->encoder); + drm_connector_attach_encoder(connector, encoder); return 0; } |