diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-11-18 12:55:21 +0200 |
---|---|---|
committer | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2022-11-19 11:09:57 +0200 |
commit | c584f86c6242dff11d3e8f7b1646e5470a132784 (patch) | |
tree | d8430799cac0faa72005b7391c70c21bd53c15d3 /drivers/gpu/drm/i915/display/intel_dvo.c | |
parent | 201ec1bbca03a0c190962626574f8061a84cc9e7 (diff) |
drm/i915/dvo: Eliminate useless 'port' variable
Reorder the drm_encoder_init() vs. encoder->port
assignment so that we don't need the extra 'port'
variable.
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221118105525.27254-6-ville.syrjala@linux.intel.com
Reviewed-by: Jani Nikula <jani.nikula@intel.com>
Diffstat (limited to 'drivers/gpu/drm/i915/display/intel_dvo.c')
-rw-r--r-- | drivers/gpu/drm/i915/display/intel_dvo.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/display/intel_dvo.c b/drivers/gpu/drm/i915/display/intel_dvo.c index 9ce3b4ec6a4d..87ee913cf89b 100644 --- a/drivers/gpu/drm/i915/display/intel_dvo.c +++ b/drivers/gpu/drm/i915/display/intel_dvo.c @@ -453,7 +453,6 @@ void intel_dvo_init(struct drm_i915_private *dev_priv) bool dvoinit; enum pipe pipe; u32 dpll[I915_MAX_PIPES]; - enum port port; /* * Allow the I2C driver info to specify the GPIO to be used in @@ -506,21 +505,20 @@ void intel_dvo_init(struct drm_i915_private *dev_priv) if (!dvoinit) continue; - port = intel_dvo_port(dvo->dvo_reg); - drm_encoder_init(&dev_priv->drm, &intel_encoder->base, - &intel_dvo_enc_funcs, - intel_dvo_encoder_type(dvo), - "DVO %c", port_name(port)); - intel_encoder->type = INTEL_OUTPUT_DVO; intel_encoder->power_domain = POWER_DOMAIN_PORT_OTHER; - intel_encoder->port = port; + intel_encoder->port = intel_dvo_port(dvo->dvo_reg); intel_encoder->pipe_mask = ~0; if (dvo->type != INTEL_DVO_CHIP_LVDS) intel_encoder->cloneable = BIT(INTEL_OUTPUT_ANALOG) | BIT(INTEL_OUTPUT_DVO); + drm_encoder_init(&dev_priv->drm, &intel_encoder->base, + &intel_dvo_enc_funcs, + intel_dvo_encoder_type(dvo), + "DVO %c", port_name(intel_encoder->port)); + if (dvo->type == INTEL_DVO_CHIP_TMDS) intel_connector->polled = DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT; |