drm/i915/dp: Trivial code tidy
authorChris Wilson <chris@chris-wilson.co.uk>
Sun, 5 Dec 2010 14:54:05 +0000 (14:54 +0000)
committerChris Wilson <chris@chris-wilson.co.uk>
Sun, 5 Dec 2010 14:54:05 +0000 (14:54 +0000)
Locally scope the crtc to where it is used.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
drivers/gpu/drm/i915/intel_dp.c

index 1d8d068bc4730ce2fec78e8207588ef289dbc5b9..2c9601f2f2082935893590bad911619c1f7d77f6 100644 (file)
@@ -1374,7 +1374,6 @@ intel_dp_link_down(struct intel_dp *intel_dp)
 {
        struct drm_device *dev = intel_dp->base.base.dev;
        struct drm_i915_private *dev_priv = dev->dev_private;
-       struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
        uint32_t DP = intel_dp->DP;
 
        DRM_DEBUG_KMS("\n");
@@ -1401,6 +1400,8 @@ intel_dp_link_down(struct intel_dp *intel_dp)
                DP |= DP_LINK_TRAIN_OFF;
 
        if (!HAS_PCH_CPT(dev) && (DP & DP_PIPEB_SELECT)) {
+               struct intel_crtc *intel_crtc = to_intel_crtc(intel_dp->base.base.crtc);
+
                /* Hardware workaround: leaving our transcoder select
                 * set to transcoder B while it's off will prevent the
                 * corresponding HDMI output on transcoder A.
@@ -1415,8 +1416,7 @@ intel_dp_link_down(struct intel_dp *intel_dp)
                /* Changes to enable or select take place the vblank
                 * after being written.
                 */
-               intel_wait_for_vblank(intel_dp->base.base.dev,
-                                     intel_crtc->pipe);
+               intel_wait_for_vblank(dev, intel_crtc->pipe);
        }
 
        I915_WRITE(intel_dp->output_reg, DP & ~DP_PORT_EN);