diff options
author | Eric Anholt <eric@anholt.net> | 2009-03-24 15:23:04 -0400 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-06-18 16:00:33 -0400 |
commit | 9a298b2acd771d8a5c0004d8f8e4156c65b11f6b (patch) | |
tree | f8bf6cfe675492cb881abb50d9aa9aa8f38733d6 /drivers/gpu/drm/drm_stub.c | |
parent | 52dc7d32b88156248167864f77a9026abe27b432 (diff) |
drm: Remove memory debugging infrastructure.
It hasn't been used in ages, and having the user tell your how much
memory is being freed at free time is a recipe for disaster even if it
was ever used.
Signed-off-by: Eric Anholt <eric@anholt.net>
Diffstat (limited to 'drivers/gpu/drm/drm_stub.c')
-rw-r--r-- | drivers/gpu/drm/drm_stub.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/drivers/gpu/drm/drm_stub.c b/drivers/gpu/drm/drm_stub.c index 387a8de1bc7e..155a5bbce680 100644 --- a/drivers/gpu/drm/drm_stub.c +++ b/drivers/gpu/drm/drm_stub.c | |||
@@ -107,7 +107,7 @@ struct drm_master *drm_master_create(struct drm_minor *minor) | |||
107 | { | 107 | { |
108 | struct drm_master *master; | 108 | struct drm_master *master; |
109 | 109 | ||
110 | master = drm_calloc(1, sizeof(*master), DRM_MEM_DRIVER); | 110 | master = kzalloc(sizeof(*master), GFP_KERNEL); |
111 | if (!master) | 111 | if (!master) |
112 | return NULL; | 112 | return NULL; |
113 | 113 | ||
@@ -149,7 +149,7 @@ static void drm_master_destroy(struct kref *kref) | |||
149 | } | 149 | } |
150 | 150 | ||
151 | if (master->unique) { | 151 | if (master->unique) { |
152 | drm_free(master->unique, master->unique_size, DRM_MEM_DRIVER); | 152 | kfree(master->unique); |
153 | master->unique = NULL; | 153 | master->unique = NULL; |
154 | master->unique_len = 0; | 154 | master->unique_len = 0; |
155 | } | 155 | } |
@@ -157,12 +157,12 @@ static void drm_master_destroy(struct kref *kref) | |||
157 | list_for_each_entry_safe(pt, next, &master->magicfree, head) { | 157 | list_for_each_entry_safe(pt, next, &master->magicfree, head) { |
158 | list_del(&pt->head); | 158 | list_del(&pt->head); |
159 | drm_ht_remove_item(&master->magiclist, &pt->hash_item); | 159 | drm_ht_remove_item(&master->magiclist, &pt->hash_item); |
160 | drm_free(pt, sizeof(*pt), DRM_MEM_MAGIC); | 160 | kfree(pt); |
161 | } | 161 | } |
162 | 162 | ||
163 | drm_ht_remove(&master->magiclist); | 163 | drm_ht_remove(&master->magiclist); |
164 | 164 | ||
165 | drm_free(master, sizeof(*master), DRM_MEM_DRIVER); | 165 | kfree(master); |
166 | } | 166 | } |
167 | 167 | ||
168 | void drm_master_put(struct drm_master **master) | 168 | void drm_master_put(struct drm_master **master) |
@@ -390,7 +390,7 @@ int drm_get_dev(struct pci_dev *pdev, const struct pci_device_id *ent, | |||
390 | 390 | ||
391 | DRM_DEBUG("\n"); | 391 | DRM_DEBUG("\n"); |
392 | 392 | ||
393 | dev = drm_calloc(1, sizeof(*dev), DRM_MEM_STUB); | 393 | dev = kzalloc(sizeof(*dev), GFP_KERNEL); |
394 | if (!dev) | 394 | if (!dev) |
395 | return -ENOMEM; | 395 | return -ENOMEM; |
396 | 396 | ||
@@ -443,7 +443,7 @@ err_g3: | |||
443 | err_g2: | 443 | err_g2: |
444 | pci_disable_device(pdev); | 444 | pci_disable_device(pdev); |
445 | err_g1: | 445 | err_g1: |
446 | drm_free(dev, sizeof(*dev), DRM_MEM_STUB); | 446 | kfree(dev); |
447 | return ret; | 447 | return ret; |
448 | } | 448 | } |
449 | EXPORT_SYMBOL(drm_get_dev); | 449 | EXPORT_SYMBOL(drm_get_dev); |
@@ -516,7 +516,7 @@ void drm_put_dev(struct drm_device *dev) | |||
516 | dev->driver->unload(dev); | 516 | dev->driver->unload(dev); |
517 | 517 | ||
518 | if (drm_core_has_AGP(dev) && dev->agp) { | 518 | if (drm_core_has_AGP(dev) && dev->agp) { |
519 | drm_free(dev->agp, sizeof(*dev->agp), DRM_MEM_AGPLISTS); | 519 | kfree(dev->agp); |
520 | dev->agp = NULL; | 520 | dev->agp = NULL; |
521 | } | 521 | } |
522 | 522 | ||
@@ -535,10 +535,9 @@ void drm_put_dev(struct drm_device *dev) | |||
535 | drm_put_minor(&dev->primary); | 535 | drm_put_minor(&dev->primary); |
536 | 536 | ||
537 | if (dev->devname) { | 537 | if (dev->devname) { |
538 | drm_free(dev->devname, strlen(dev->devname) + 1, | 538 | kfree(dev->devname); |
539 | DRM_MEM_DRIVER); | ||
540 | dev->devname = NULL; | 539 | dev->devname = NULL; |
541 | } | 540 | } |
542 | drm_free(dev, sizeof(*dev), DRM_MEM_STUB); | 541 | kfree(dev); |
543 | } | 542 | } |
544 | EXPORT_SYMBOL(drm_put_dev); | 543 | EXPORT_SYMBOL(drm_put_dev); |