diff options
author | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 12:48:16 +0200 |
---|---|---|
committer | Jani Nikula <jani.nikula@intel.com> | 2015-12-16 14:35:25 +0200 |
commit | 19c8054c4d82932d9f6bbf8d650aae4a1399a64d (patch) | |
tree | 96aaa7a4e8f4872286c501d40f44df36d799ad1a /drivers/gpu/drm/i915/i915_drv.c | |
parent | ada8f955988394ca032b8eece7c9ca70bed42745 (diff) | |
download | op-kernel-dev-19c8054c4d82932d9f6bbf8d650aae4a1399a64d.zip op-kernel-dev-19c8054c4d82932d9f6bbf8d650aae4a1399a64d.tar.gz |
drm/i915: prefer for_each_intel_* macros for iteration
Use the for_each_intel_* macros for iterating intel_encoder,
intel_connector, and intel_crtc. No functional changes.
Reviewed-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
Link: http://patchwork.freedesktop.org/patch/msgid/1450262896-5325-1-git-send-email-jani.nikula@intel.com
Diffstat (limited to 'drivers/gpu/drm/i915/i915_drv.c')
-rw-r--r-- | drivers/gpu/drm/i915/i915_drv.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/i915_drv.c b/drivers/gpu/drm/i915/i915_drv.c index 8ddfcce..44ad308 100644 --- a/drivers/gpu/drm/i915/i915_drv.c +++ b/drivers/gpu/drm/i915/i915_drv.c @@ -543,15 +543,12 @@ bool i915_semaphore_is_enabled(struct drm_device *dev) static void intel_suspend_encoders(struct drm_i915_private *dev_priv) { struct drm_device *dev = dev_priv->dev; - struct drm_encoder *encoder; + struct intel_encoder *encoder; drm_modeset_lock_all(dev); - list_for_each_entry(encoder, &dev->mode_config.encoder_list, head) { - struct intel_encoder *intel_encoder = to_intel_encoder(encoder); - - if (intel_encoder->suspend) - intel_encoder->suspend(intel_encoder); - } + for_each_intel_encoder(dev, encoder) + if (encoder->suspend) + encoder->suspend(encoder); drm_modeset_unlock_all(dev); } |