aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_agpsupport.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/gpu/drm/drm_agpsupport.c')
-rw-r--r--drivers/gpu/drm/drm_agpsupport.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/drivers/gpu/drm/drm_agpsupport.c b/drivers/gpu/drm/drm_agpsupport.c
index 14796594e5d9..7a0d042c8d6a 100644
--- a/drivers/gpu/drm/drm_agpsupport.c
+++ b/drivers/gpu/drm/drm_agpsupport.c
@@ -203,7 +203,7 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
203 203
204 if (!dev->agp || !dev->agp->acquired) 204 if (!dev->agp || !dev->agp->acquired)
205 return -EINVAL; 205 return -EINVAL;
206 if (!(entry = drm_alloc(sizeof(*entry), DRM_MEM_AGPLISTS))) 206 if (!(entry = kmalloc(sizeof(*entry), GFP_KERNEL)))
207 return -ENOMEM; 207 return -ENOMEM;
208 208
209 memset(entry, 0, sizeof(*entry)); 209 memset(entry, 0, sizeof(*entry));
@@ -211,7 +211,7 @@ int drm_agp_alloc(struct drm_device *dev, struct drm_agp_buffer *request)
211 pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE; 211 pages = (request->size + PAGE_SIZE - 1) / PAGE_SIZE;
212 type = (u32) request->type; 212 type = (u32) request->type;
213 if (!(memory = drm_alloc_agp(dev, pages, type))) { 213 if (!(memory = drm_alloc_agp(dev, pages, type))) {
214 drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); 214 kfree(entry);
215 return -ENOMEM; 215 return -ENOMEM;
216 } 216 }
217 217
@@ -369,7 +369,7 @@ int drm_agp_free(struct drm_device *dev, struct drm_agp_buffer *request)
369 list_del(&entry->head); 369 list_del(&entry->head);
370 370
371 drm_free_agp(entry->memory, entry->pages); 371 drm_free_agp(entry->memory, entry->pages);
372 drm_free(entry, sizeof(*entry), DRM_MEM_AGPLISTS); 372 kfree(entry);
373 return 0; 373 return 0;
374} 374}
375EXPORT_SYMBOL(drm_agp_free); 375EXPORT_SYMBOL(drm_agp_free);
@@ -397,13 +397,13 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
397{ 397{
398 struct drm_agp_head *head = NULL; 398 struct drm_agp_head *head = NULL;
399 399
400 if (!(head = drm_alloc(sizeof(*head), DRM_MEM_AGPLISTS))) 400 if (!(head = kmalloc(sizeof(*head), GFP_KERNEL)))
401 return NULL; 401 return NULL;
402 memset((void *)head, 0, sizeof(*head)); 402 memset((void *)head, 0, sizeof(*head));
403 head->bridge = agp_find_bridge(dev->pdev); 403 head->bridge = agp_find_bridge(dev->pdev);
404 if (!head->bridge) { 404 if (!head->bridge) {
405 if (!(head->bridge = agp_backend_acquire(dev->pdev))) { 405 if (!(head->bridge = agp_backend_acquire(dev->pdev))) {
406 drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); 406 kfree(head);
407 return NULL; 407 return NULL;
408 } 408 }
409 agp_copy_info(head->bridge, &head->agp_info); 409 agp_copy_info(head->bridge, &head->agp_info);
@@ -412,7 +412,7 @@ struct drm_agp_head *drm_agp_init(struct drm_device *dev)
412 agp_copy_info(head->bridge, &head->agp_info); 412 agp_copy_info(head->bridge, &head->agp_info);
413 } 413 }
414 if (head->agp_info.chipset == NOT_SUPPORTED) { 414 if (head->agp_info.chipset == NOT_SUPPORTED) {
415 drm_free(head, sizeof(*head), DRM_MEM_AGPLISTS); 415 kfree(head);
416 return NULL; 416 return NULL;
417 } 417 }
418 INIT_LIST_HEAD(&head->memory); 418 INIT_LIST_HEAD(&head->memory);