mirror of
git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2025-08-05 16:54:27 +00:00
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>
This commit is contained in:
parent
c805ec7eb2
commit
bed00ddedf
1 changed files with 6 additions and 6 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue