summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/i915_debugfs.c
diff options
context:
space:
mode:
authorDamien Lespiau2014-08-05 12:29:37 +0200
committerDaniel Vetter2014-08-08 17:43:50 +0200
commitb2784e151903628a086d2ee12cf943690216cd6c (patch)
tree625718dd5ba79c79d2930c77b55a0edf231575dd /drivers/gpu/drm/i915/i915_debugfs.c
parentdrm/i915: Demote the DRRS messages to debug messages (diff)
downloadkernel-qcow2-linux-b2784e151903628a086d2ee12cf943690216cd6c.tar.gz
kernel-qcow2-linux-b2784e151903628a086d2ee12cf943690216cd6c.tar.xz
kernel-qcow2-linux-b2784e151903628a086d2ee12cf943690216cd6c.zip
drm/i915: Introduce a for_each_intel_encoder() macro
Following the established idom, let's provide a macro to iterate through the encoders. spatch helps, once more, for the substitution: @@ iterator name list_for_each_entry; iterator name for_each_intel_encoder; struct intel_encoder * encoder; struct drm_device * dev; @@ -list_for_each_entry(encoder, &dev->mode_config.encoder_list, base.head) { +for_each_intel_encoder(dev, encoder) { ... } I also modified a few call sites by hand where a pointer to mode_config was directly used (to avoid overflowing 80 chars). Signed-off-by: Damien Lespiau <damien.lespiau@intel.com> [danvet: Wrap paramters correctly in the macro and remove spurious space checkpatch noticed.] Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/i915_debugfs.c')
-rw-r--r--drivers/gpu/drm/i915/i915_debugfs.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c
index aea1a819c775..330caa1ab9f9 100644
--- a/drivers/gpu/drm/i915/i915_debugfs.c
+++ b/drivers/gpu/drm/i915/i915_debugfs.c
@@ -2708,8 +2708,7 @@ static int i9xx_pipe_crc_auto_source(struct drm_device *dev, enum pipe pipe,
*source = INTEL_PIPE_CRC_SOURCE_PIPE;
drm_modeset_lock_all(dev);
- list_for_each_entry(encoder, &dev->mode_config.encoder_list,
- base.head) {
+ for_each_intel_encoder(dev, encoder) {
if (!encoder->base.crtc)
continue;