projects
/
GitHub
/
exynos8895
/
android_kernel_samsung_universal8895.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
ecf7ace
)
drm/ttm: Use kref_sub instead of repeatedly calling kref_put
author
Thomas Hellstrom
<thellstrom@vmware.com>
Tue, 16 Nov 2010 14:21:08 +0000
(15:21 +0100)
committer
Dave Airlie
<airlied@redhat.com>
Mon, 22 Nov 2010 03:25:14 +0000
(13:25 +1000)
Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
drivers/gpu/drm/ttm/ttm_bo.c
patch
|
blob
|
blame
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index a586378b1b2b420110bebfc3f74c13d278d07e70..9ef893d5da88aae53be7a050f4b164d1ee0c1721 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-266,10
+266,8
@@
static void ttm_bo_ref_bug(struct kref *list_kref)
void ttm_bo_list_ref_sub(struct ttm_buffer_object *bo, int count,
bool never_free)
{
- while (count--)
- kref_put(&bo->list_kref,
- (never_free || (count >= 0)) ? ttm_bo_ref_bug :
- ttm_bo_release_list);
+ kref_sub(&bo->list_kref, count,
+ (never_free) ? ttm_bo_ref_bug : ttm_bo_release_list);
}
int ttm_bo_reserve(struct ttm_buffer_object *bo,