summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/rcar-du/rcar_du_drv.c
diff options
context:
space:
mode:
authorLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-06-16 22:22:23 +0200
committerLaurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>2013-08-09 23:17:47 +0200
commit990d07a5a9582f14b4d6d13cde5311d6c694096a (patch)
treedd3d21a6c8b0ff3307d70436149f1ef85a71287a /drivers/gpu/drm/rcar-du/rcar_du_drv.c
parentcb2025d2509ffab1c426509fd9de3d83e40398b9 (diff)
downloadblackbird-op-linux-990d07a5a9582f14b4d6d13cde5311d6c694096a.tar.gz
blackbird-op-linux-990d07a5a9582f14b4d6d13cde5311d6c694096a.zip
drm/rcar-du: Use dynamic number of CRTCs instead of CRTCs array size
The rcar_du_device structure contains a field that stores the number of CRTCs, use it instead of the CRTCs array size. This prepares the driver to support a variable number of CRTCs. Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/rcar-du/rcar_du_drv.c')
-rw-r--r--drivers/gpu/drm/rcar-du/rcar_du_drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index cdc363b6cd37..fd7cdda375b6 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -105,7 +105,7 @@ static void rcar_du_preclose(struct drm_device *dev, struct drm_file *file)
struct rcar_du_device *rcdu = dev->dev_private;
unsigned int i;
- for (i = 0; i < ARRAY_SIZE(rcdu->crtcs); ++i)
+ for (i = 0; i < rcdu->num_crtcs; ++i)
rcar_du_crtc_cancel_page_flip(&rcdu->crtcs[i], file);
}
OpenPOWER on IntegriCloud