aboutsummaryrefslogtreecommitdiff
path: root/linux-core/drm_memory.c
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2006-12-19 22:10:34 +1100
committerDave Airlie <airlied@linux.ie>2006-12-19 22:10:34 +1100
commit737c73d1a081823f5c95a6fd68173b56a304eae5 (patch)
tree80fcc0a3cdca71068c1c847ace69b80820f94ca5 /linux-core/drm_memory.c
parentbc4c83573111361e9817d6a7414bd84f73ca7cce (diff)
add kcalloc compat for before 2.6.10
Diffstat (limited to 'linux-core/drm_memory.c')
-rw-r--r--linux-core/drm_memory.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/linux-core/drm_memory.c b/linux-core/drm_memory.c
index 3370c279..10f43f41 100644
--- a/linux-core/drm_memory.c
+++ b/linux-core/drm_memory.c
@@ -134,13 +134,7 @@ int drm_mem_info(char *buf, char **start, off_t offset,
/** Wrapper around kmalloc() */
void *drm_calloc(size_t nmemb, size_t size, int area)
{
- void *addr;
-
- addr = kmalloc(size * nmemb, GFP_KERNEL);
- if (addr != NULL)
- memset((void *)addr, 0, size * nmemb);
-
- return addr;
+ return kcalloc(nmemb, size, GFP_KERNEL);
}
EXPORT_SYMBOL(drm_calloc);