summaryrefslogtreecommitdiff
path: root/drivers/char/agp
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2010-06-15 09:52:37 +1000
committerDave Airlie <airlied@redhat.com>2010-06-15 09:56:01 +1000
commitda931a931da85218add949266238c54b5fecd37f (patch)
tree63f4e081715b00b403bf45d705a636a29d80a7e9 /drivers/char/agp
parentf5c5f040b565435e9a85898dc87ab365395e0603 (diff)
agp: drop vmalloc flag.
Since the code that was too ugly to live is upstream, we can use it now, instead of rolling our own. Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/char/agp')
-rw-r--r--drivers/char/agp/generic.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c
index 4b51982fd23a..4e414417730b 100644
--- a/drivers/char/agp/generic.c
+++ b/drivers/char/agp/generic.c
@@ -97,20 +97,18 @@ EXPORT_SYMBOL(agp_flush_chipset);
void agp_alloc_page_array(size_t size, struct agp_memory *mem)
{
mem->pages = NULL;
- mem->vmalloc_flag = false;
if (size <= 2*PAGE_SIZE)
mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NORETRY);
if (mem->pages == NULL) {
mem->pages = vmalloc(size);
- mem->vmalloc_flag = true;
}
}
EXPORT_SYMBOL(agp_alloc_page_array);
void agp_free_page_array(struct agp_memory *mem)
{
- if (mem->vmalloc_flag) {
+ if (is_vmalloc_addr(mem->pages)) {
vfree(mem->pages);
} else {
kfree(mem->pages);