diff options
author | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
---|---|---|
committer | Jiri Kosina <jkosina@suse.cz> | 2010-08-04 09:14:38 -0400 |
commit | d790d4d583aeaed9fc6f8a9f4d9f8ce6b1c15c7f (patch) | |
tree | 854ab394486288d40fa8179cbfaf66e8bdc44b0f /drivers/char/agp/generic.c | |
parent | 73b2c7165b76b20eb1290e7efebc33cfd21db1ca (diff) | |
parent | 3a09b1be53d23df780a0cd0e4087a05e2ca4a00c (diff) |
Merge branch 'master' into for-next
Diffstat (limited to 'drivers/char/agp/generic.c')
-rw-r--r-- | drivers/char/agp/generic.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 4b51982fd23a..d2abf5143983 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
@@ -97,20 +97,18 @@ EXPORT_SYMBOL(agp_flush_chipset); | |||
97 | void agp_alloc_page_array(size_t size, struct agp_memory *mem) | 97 | void agp_alloc_page_array(size_t size, struct agp_memory *mem) |
98 | { | 98 | { |
99 | mem->pages = NULL; | 99 | mem->pages = NULL; |
100 | mem->vmalloc_flag = false; | ||
101 | 100 | ||
102 | if (size <= 2*PAGE_SIZE) | 101 | if (size <= 2*PAGE_SIZE) |
103 | mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NORETRY); | 102 | mem->pages = kmalloc(size, GFP_KERNEL | __GFP_NOWARN); |
104 | if (mem->pages == NULL) { | 103 | if (mem->pages == NULL) { |
105 | mem->pages = vmalloc(size); | 104 | mem->pages = vmalloc(size); |
106 | mem->vmalloc_flag = true; | ||
107 | } | 105 | } |
108 | } | 106 | } |
109 | EXPORT_SYMBOL(agp_alloc_page_array); | 107 | EXPORT_SYMBOL(agp_alloc_page_array); |
110 | 108 | ||
111 | void agp_free_page_array(struct agp_memory *mem) | 109 | void agp_free_page_array(struct agp_memory *mem) |
112 | { | 110 | { |
113 | if (mem->vmalloc_flag) { | 111 | if (is_vmalloc_addr(mem->pages)) { |
114 | vfree(mem->pages); | 112 | vfree(mem->pages); |
115 | } else { | 113 | } else { |
116 | kfree(mem->pages); | 114 | kfree(mem->pages); |