summaryrefslogtreecommitdiffstats
path: root/drivers/char/drm/drmP.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@starflyer.(none)>2005-07-07 20:33:26 +1000
committerDave Airlie <airlied@linux.ie>2005-07-07 20:33:26 +1000
commitb9523249de59c49e7c2cc83dfa73fb011a489a45 (patch)
tree0cebe6a2eeec658f6beb588fb7c9b6e5a5af4033 /drivers/char/drm/drmP.h
parentf650130803c4c0b5e5d76eff24faae722e3a69e2 (diff)
drm: use kcalloc now that it is available..
Make the DRM drm_calloc call kcalloc now. Signed-off-by: Dave Airlie <airlied@linux.ie>
Diffstat (limited to 'drivers/char/drm/drmP.h')
-rw-r--r--drivers/char/drm/drmP.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/char/drm/drmP.h b/drivers/char/drm/drmP.h
index b04ddf12a0f..2c7b1fc3bb2 100644
--- a/drivers/char/drm/drmP.h
+++ b/drivers/char/drm/drmP.h
@@ -806,7 +806,6 @@ extern ssize_t drm_read(struct file *filp, char __user *buf, size_t count,
extern void drm_mem_init(void);
extern int drm_mem_info(char *buf, char **start, off_t offset,
int request, int *eof, void *data);
-extern void *drm_calloc(size_t nmemb, size_t size, int area);
extern void *drm_realloc(void *oldpt, size_t oldsize, size_t size,
int area);
extern unsigned long drm_alloc_pages(int order, int area);
@@ -1064,9 +1063,16 @@ static __inline__ void drm_free(void *pt, size_t size, int area)
{
kfree(pt);
}
+
+/** Wrapper around kcalloc() */
+static __inline__ void *drm_calloc(size_t nmemb, size_t size, int area)
+{
+ return kcalloc(nmemb, size, GFP_KERNEL);
+}
#else
extern void *drm_alloc(size_t size, int area);
extern void drm_free(void *pt, size_t size, int area);
+extern void *drm_calloc(size_t nmemb, size_t size, int area);
#endif
/*@}*/