diff options
author | Dave Airlie <airlied@redhat.com> | 2010-06-15 09:52:37 +1000 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-06-15 09:56:01 +1000 |
commit | da931a931da85218add949266238c54b5fecd37f (patch) | |
tree | 63f4e081715b00b403bf45d705a636a29d80a7e9 | |
parent | f5c5f040b565435e9a85898dc87ab365395e0603 (diff) | |
download | kernel_samsung_smdk4412-da931a931da85218add949266238c54b5fecd37f.zip kernel_samsung_smdk4412-da931a931da85218add949266238c54b5fecd37f.tar.gz kernel_samsung_smdk4412-da931a931da85218add949266238c54b5fecd37f.tar.bz2 |
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>
-rw-r--r-- | drivers/char/agp/generic.c | 4 | ||||
-rw-r--r-- | include/linux/agp_backend.h | 1 |
2 files changed, 1 insertions, 4 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 4b51982..4e41441 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); diff --git a/include/linux/agp_backend.h b/include/linux/agp_backend.h index 9101ed6..09ea4a1 100644 --- a/include/linux/agp_backend.h +++ b/include/linux/agp_backend.h @@ -79,7 +79,6 @@ struct agp_memory { u32 physical; bool is_bound; bool is_flushed; - bool vmalloc_flag; /* list of agp_memory mapped to the aperture */ struct list_head mapped_list; /* DMA-mapped addresses */ |