Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 4420
b: refs/heads/master
c: b952324
h: refs/heads/master
v: v3
  • Loading branch information
Dave Airlie authored and Dave Airlie committed Jul 7, 2005
1 parent b9bc63b commit 26627f6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f650130803c4c0b5e5d76eff24faae722e3a69e2
refs/heads/master: b9523249de59c49e7c2cc83dfa73fb011a489a45
8 changes: 7 additions & 1 deletion trunk/drivers/char/drm/drmP.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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

/*@}*/
Expand Down
13 changes: 0 additions & 13 deletions trunk/drivers/char/drm/drm_memory.c
Original file line number Diff line number Diff line change
Expand Up @@ -65,19 +65,6 @@ int drm_mem_info(char *buf, char **start, off_t offset,
return 0;
}

/** 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;
}
EXPORT_SYMBOL(drm_calloc);

/** Wrapper around kmalloc() and kfree() */
void *drm_realloc(void *oldpt, size_t oldsize, size_t size, int area)
{
Expand Down

0 comments on commit 26627f6

Please sign in to comment.