drm/armada: use number of CRTCs registered

Use the number of CRTCs registered to size the vblank arrays rather than
our own count.  Number CRTCs using this as well.  This permits us to
register CRTCs as components in the near future rather than as part of a
single device.

Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
diff --git a/drivers/gpu/drm/armada/armada_drv.c b/drivers/gpu/drm/armada/armada_drv.c
index 58884d8..add8b10 100644
--- a/drivers/gpu/drm/armada/armada_drv.c
+++ b/drivers/gpu/drm/armada/armada_drv.c
@@ -164,7 +164,7 @@
 		if (irq < 0)
 			goto err_kms;
 
-		ret = armada_drm_crtc_create(dev, n, res[n], irq);
+		ret = armada_drm_crtc_create(dev, res[n], irq);
 		if (ret)
 			goto err_kms;
 	}
@@ -175,7 +175,7 @@
 		goto err_kms;
 #endif
 
-	ret = drm_vblank_init(dev, n);
+	ret = drm_vblank_init(dev, dev->mode_config.num_crtc);
 	if (ret)
 		goto err_kms;