diff options
Diffstat (limited to 'drivers/char/agp/generic.c')
| -rw-r--r-- | drivers/char/agp/generic.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/char/agp/generic.c b/drivers/char/agp/generic.c index 7fc0c99a3a58..b6650a63197d 100644 --- a/drivers/char/agp/generic.c +++ b/drivers/char/agp/generic.c | |||
| @@ -202,10 +202,13 @@ void agp_free_memory(struct agp_memory *curr) | |||
| 202 | } | 202 | } |
| 203 | if (curr->page_count != 0) { | 203 | if (curr->page_count != 0) { |
| 204 | for (i = 0; i < curr->page_count; i++) { | 204 | for (i = 0; i < curr->page_count; i++) { |
| 205 | curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]), AGP_PAGE_DESTROY_UNMAP); | 205 | curr->memory[i] = (unsigned long)gart_to_virt(curr->memory[i]); |
| 206 | curr->bridge->driver->agp_destroy_page((void *)curr->memory[i], | ||
| 207 | AGP_PAGE_DESTROY_UNMAP); | ||
| 206 | } | 208 | } |
| 207 | for (i = 0; i < curr->page_count; i++) { | 209 | for (i = 0; i < curr->page_count; i++) { |
| 208 | curr->bridge->driver->agp_destroy_page(gart_to_virt(curr->memory[i]), AGP_PAGE_DESTROY_FREE); | 210 | curr->bridge->driver->agp_destroy_page((void *)curr->memory[i], |
| 211 | AGP_PAGE_DESTROY_FREE); | ||
| 209 | } | 212 | } |
| 210 | } | 213 | } |
| 211 | agp_free_key(curr->key); | 214 | agp_free_key(curr->key); |
