drm/i915: Use for_each_pipe in intel_display_crc_init

We have a nice macro, so use it.

Reviewed-by: Damien Lespiau <damien.lespiau@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
This commit is contained in:
Daniel Vetter 2013-11-14 11:30:42 +01:00
parent b30324adaf
commit b378360e8f
1 changed files with 3 additions and 3 deletions

View File

@ -3014,10 +3014,10 @@ static struct i915_debugfs_files {
void intel_display_crc_init(struct drm_device *dev) void intel_display_crc_init(struct drm_device *dev)
{ {
struct drm_i915_private *dev_priv = dev->dev_private; struct drm_i915_private *dev_priv = dev->dev_private;
int i; enum pipe pipe;
for (i = 0; i < INTEL_INFO(dev)->num_pipes; i++) { for_each_pipe(pipe) {
struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[i]; struct intel_pipe_crc *pipe_crc = &dev_priv->pipe_crc[pipe];
pipe_crc->opened = false; pipe_crc->opened = false;
spin_lock_init(&pipe_crc->lock); spin_lock_init(&pipe_crc->lock);