提交 965d3807 编写于 作者: J Jean Delvare 提交者: Dave Airlie

drm/ttm: Simplify ttm_bo_wait_unreserved

Function ttm_bo_wait_unreserved can be slightly simplified.
Signed-off-by: NJean Delvare <khali@linux-fr.org>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: NDave Airlie <airlied@redhat.com>
上级 5480f727
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册