summaryrefslogtreecommitdiff
path: root/linux/drm_memory.h
diff options
context:
space:
mode:
authorDave Airlie <airlied@linux.ie>2004-08-30 09:01:50 +0000
committerDave Airlie <airlied@linux.ie>2004-08-30 09:01:50 +0000
commit7809efc8c32520e6b25c143ee3276edbf534ed14 (patch)
treecfa0ada45d368025b7506277fb4d2d22db243518 /linux/drm_memory.h
parent08de6e5b04c1950a5f396315e59d2476726e26d8 (diff)
drm-memory patch, cleans up alloc/free and makes calloc look more libc like
Diffstat (limited to 'linux/drm_memory.h')
-rw-r--r--linux/drm_memory.h20
1 files changed, 3 insertions, 17 deletions
diff --git a/linux/drm_memory.h b/linux/drm_memory.h
index fe8141c9..669bef08 100644
--- a/linux/drm_memory.h
+++ b/linux/drm_memory.h
@@ -39,10 +39,8 @@
/**
* Cut down version of drm_memory_debug.h, which used to be called
- * drm_memory.h. If you want the debug functionality, change 0 to 1
- * below.
+ * drm_memory.h.
*/
-#define DEBUG_MEMORY 0
/* Need the 4-argument version of vmap(). */
#if __OS_HAS_AGP && defined(VMAP_4_ARGS)
@@ -199,7 +197,7 @@ static inline void drm_ioremapfree(void *pt, unsigned long size, drm_device_t *d
}
-#if DEBUG_MEMORY
+#ifdef DEBUG_MEMORY
#include "drm_memory_debug.h"
#else
@@ -228,13 +226,7 @@ int DRM(mem_info)(char *buf, char **start, off_t offset,
}
/** Wrapper around kmalloc() */
-void *DRM(alloc)(size_t size, int area)
-{
- return kmalloc(size, GFP_KERNEL);
-}
-
-/** Wrapper around kmalloc() */
-void *DRM(calloc)(size_t size, size_t nmemb, int area)
+void *DRM(calloc)(size_t nmemb, size_t size, int area)
{
void *addr;
@@ -258,12 +250,6 @@ void *DRM(realloc)(void *oldpt, size_t oldsize, size_t size, int area)
return pt;
}
-/** Wrapper around kfree() */
-void DRM(free)(void *pt, size_t size, int area)
-{
- kfree(pt);
-}
-
/**
* Allocate pages.
*