]> git.baikalelectronics.ru Git - kernel.git/commit
drm/i915: Use for_each_crtc() when iterating through the CRTCs
authorDamien Lespiau <damien.lespiau@intel.com>
Tue, 13 May 2014 22:32:24 +0000 (23:32 +0100)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Tue, 13 May 2014 22:38:46 +0000 (00:38 +0200)
commit19d442b19fd34913658d5c292fd38bc3b021d65d
tree000ba476949973ad1175aa1bc2182550032d1c64
parentc1bef493f0e0702055bede7baed7153a8716601a
drm/i915: Use for_each_crtc() when iterating through the CRTCs

Patch done using the following semantic patch (thanks Daniel for the
help!)

  @@
  iterator name list_for_each_entry;
  iterator name for_each_crtc;
  struct drm_crtc * crtc;
  struct drm_device * dev;
  @@
  -list_for_each_entry(crtc,&dev->mode_config.crtc_list, head) {
  +for_each_crtc(dev,crtc) {
   ...
  }

Followed by a couple of fixups by hand (that spatch doesn't match the
cases where list_for_each_entry() is not followed by a set of '{', '}',
but I couldn't figure out a way to leave the '{' out of the iterator
match).

Signed-off-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/i915_drv.c
drivers/gpu/drm/i915/intel_display.c
drivers/gpu/drm/i915/intel_fbdev.c
drivers/gpu/drm/i915/intel_pm.c