@@ -3236,10 +3236,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)
@@ -3254,10 +3252,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;
@@ -3400,10 +3396,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)
@@ -3417,10 +3411,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;
All encoders are now converted so there's no need for these checks any more. Signed-Off-by: Daniel Vetter <daniel.vetter@ffwll.ch> --- drivers/gpu/drm/i915/intel_display.c | 24 ++++++++---------------- 1 files changed, 8 insertions(+), 16 deletions(-)