summaryrefslogtreecommitdiff
path: root/linux-core
diff options
context:
space:
mode:
authorMichel Dänzer <michel@tungstengraphics.com>2007-06-22 11:44:38 +0200
committerMichel Dänzer <michel@tungstengraphics.com>2007-06-22 11:44:38 +0200
commit2738bca6f52e236a2d9a0e456a78b10442ededdd (patch)
tree4367af6984aba21a4ef81c0bf44f8232372a712a /linux-core
parent6e2cd7c16331b07c395732d132a6a4cdc1fad481 (diff)
Use drm_calloc instead of assigning 0.
Diffstat (limited to 'linux-core')
-rw-r--r--linux-core/drm_irq.c15
1 files 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;