aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_fbdev.c
diff options
context:
space:
mode:
authorDamien Lespiau <damien.lespiau@intel.com>2014-05-13 18:32:24 -0400
committerDaniel Vetter <daniel.vetter@ffwll.ch>2014-05-13 18:38:46 -0400
commit70e1e0ec02dfe93650fb2c70824dc81e3eb5b2cc (patch)
tree000ba476949973ad1175aa1bc2182550032d1c64 /drivers/gpu/drm/i915/intel_fbdev.c
parentd79b814d2fdc917ecf496161898e88801ae9b40b (diff)
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>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_fbdev.c')
-rw-r--r--drivers/gpu/drm/i915/intel_fbdev.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/i915/intel_fbdev.c b/drivers/gpu/drm/i915/intel_fbdev.c
index fce4a0d93c0b..634f0b07ae64 100644
--- a/drivers/gpu/drm/i915/intel_fbdev.c
+++ b/drivers/gpu/drm/i915/intel_fbdev.c
@@ -488,7 +488,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
488 return false; 488 return false;
489 489
490 /* Find the largest fb */ 490 /* Find the largest fb */
491 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 491 for_each_crtc(dev, crtc) {
492 intel_crtc = to_intel_crtc(crtc); 492 intel_crtc = to_intel_crtc(crtc);
493 493
494 if (!intel_crtc->active || !crtc->primary->fb) { 494 if (!intel_crtc->active || !crtc->primary->fb) {
@@ -512,7 +512,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
512 } 512 }
513 513
514 /* Now make sure all the pipes will fit into it */ 514 /* Now make sure all the pipes will fit into it */
515 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 515 for_each_crtc(dev, crtc) {
516 unsigned int cur_size; 516 unsigned int cur_size;
517 517
518 intel_crtc = to_intel_crtc(crtc); 518 intel_crtc = to_intel_crtc(crtc);
@@ -577,7 +577,7 @@ static bool intel_fbdev_init_bios(struct drm_device *dev,
577 drm_framebuffer_reference(&ifbdev->fb->base); 577 drm_framebuffer_reference(&ifbdev->fb->base);
578 578
579 /* Final pass to check if any active pipes don't have fbs */ 579 /* Final pass to check if any active pipes don't have fbs */
580 list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) { 580 for_each_crtc(dev, crtc) {
581 intel_crtc = to_intel_crtc(crtc); 581 intel_crtc = to_intel_crtc(crtc);
582 582
583 if (!intel_crtc->active) 583 if (!intel_crtc->active)