From: Daniel Vetter Date: Sun, 1 Jul 2012 21:24:36 +0000 (+0200) Subject: drm/i915: rip out encoder->disable/enable checks X-Git-Tag: MMI-PSA29.97-13-9~15843^2~15^2~3^2~48 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fa5c73b1b20ffc7e9df83a5e763af1e3b7cc96d3;p=GitHub%2FMotorolaMobilityLLC%2Fkernel-slsi.git drm/i915: rip out encoder->disable/enable checks All encoders are now converted so there's no need for these checks any more. Reviewed-by: Jesse Barnes Signed-Off-by: Daniel Vetter --- diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 0d48ebe6ac9d..4805385a49ed 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c @@ -3267,10 +3267,8 @@ static void ironlake_crtc_enable(struct drm_crtc *crtc) intel_crtc_update_cursor(crtc, true); encoders: - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->enable) - encoder->enable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->enable(encoder); } static void ironlake_crtc_disable(struct drm_crtc *crtc) @@ -3285,10 +3283,8 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) /* XXX: For compatability with the crtc helper code, call the encoder's * disable function unconditionally for now. */ - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->disable) - encoder->disable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->disable(encoder); if (!intel_crtc->active) return; @@ -3412,10 +3408,8 @@ static void i9xx_crtc_enable(struct drm_crtc *crtc) intel_crtc_update_cursor(crtc, true); encoders: - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->enable) - encoder->enable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->enable(encoder); } static void i9xx_crtc_disable(struct drm_crtc *crtc) @@ -3429,10 +3423,8 @@ static void i9xx_crtc_disable(struct drm_crtc *crtc) /* XXX: For compatability with the crtc helper code, call the encoder's * disable function unconditionally for now. */ - for_each_encoder_on_crtc(dev, crtc, encoder) { - if (encoder->disable) - encoder->disable(encoder); - } + for_each_encoder_on_crtc(dev, crtc, encoder) + encoder->disable(encoder); if (!intel_crtc->active) return;