From 2738bca6f52e236a2d9a0e456a78b10442ededdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michel=20D=C3=A4nzer?= Date: Fri, 22 Jun 2007 11:44:38 +0200 Subject: Use drm_calloc instead of assigning 0. --- linux-core/drm_irq.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/linux-core/drm_irq.c b/linux-core/drm_irq.c index c9d1c0d2..01e970f9 100644 --- a/linux-core/drm_irq.c +++ b/linux-core/drm_irq.c @@ -105,18 +105,18 @@ int drm_vblank_init(drm_device_t *dev, int num_crtcs) if (!dev->vblank_refcount) goto err; - dev->last_vblank = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->last_vblank = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->last_vblank) goto err; - dev->vblank_premodeset = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->vblank_premodeset = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->vblank_premodeset) goto err; - dev->vblank_offset = drm_alloc(sizeof(u32) * num_crtcs, - DRM_MEM_DRIVER); + dev->vblank_offset = drm_calloc(1, sizeof(u32) * num_crtcs, + DRM_MEM_DRIVER); if (!dev->vblank_offset) goto err; @@ -126,9 +126,6 @@ int drm_vblank_init(drm_device_t *dev, int num_crtcs) INIT_LIST_HEAD(&dev->vbl_sigs[i]); atomic_set(&dev->_vblank_count[i], 0); atomic_set(&dev->vblank_refcount[i], 0); - dev->last_vblank[i] = 0; - dev->vblank_premodeset[i] = 0; - dev->vblank_offset[i] = 0; } return 0; -- cgit v1.2.3