projects
/
openwrt
/
staging
/
blogic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5480f72
)
drm/ttm: Simplify ttm_bo_wait_unreserved
author
Jean Delvare
<
[email protected]
>
Sat, 9 Oct 2010 12:36:45 +0000
(12:36 +0000)
committer
Dave Airlie
<
[email protected]
>
Tue, 19 Oct 2010 04:12:27 +0000
(14:12 +1000)
Function ttm_bo_wait_unreserved can be slightly simplified.
Signed-off-by: Jean Delvare <
[email protected]
>
Cc: Thomas Hellstrom <
[email protected]
>
Cc: Jerome Glisse <
[email protected]
>
Signed-off-by: Dave Airlie <
[email protected]
>
drivers/gpu/drm/ttm/ttm_bo.c
patch
|
blob
|
history
diff --git
a/drivers/gpu/drm/ttm/ttm_bo.c
b/drivers/gpu/drm/ttm/ttm_bo.c
index 5ef0103bd0b60b722f55783c9c80e05cf2230aae..9f2eed520fc3d54af683388a08183599d813c6f5 100644
(file)
--- a/
drivers/gpu/drm/ttm/ttm_bo.c
+++ b/
drivers/gpu/drm/ttm/ttm_bo.c
@@
-166,18
+166,13
@@
static void ttm_bo_release_list(struct kref *list_kref)
int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible)
{
-
if (interruptible) {
- int ret = 0;
-
- ret = wait_event_interruptible(bo->event_queue,
+ return wait_event_interruptible(bo->event_queue,
atomic_read(&bo->reserved) == 0);
- if (unlikely(ret != 0))
- return ret;
} else {
wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0);
+ return 0;
}
- return 0;
}
EXPORT_SYMBOL(ttm_bo_wait_unreserved);