diff options
author | Jean Delvare <khali@linux-fr.org> | 2010-10-09 08:36:45 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-10-19 00:12:27 -0400 |
commit | 965d38074e6eae71757a8baf9a348139e1e6894d (patch) | |
tree | f15b60ba4a52aead059a5e6bf651765db337b832 /drivers/gpu/drm/ttm | |
parent | 5480f727dc4c049eb46b191bfaeb034067aa6835 (diff) |
drm/ttm: Simplify ttm_bo_wait_unreserved
Function ttm_bo_wait_unreserved can be slightly simplified.
Signed-off-by: Jean Delvare <khali@linux-fr.org>
Cc: Thomas Hellstrom <thellstrom@vmware.com>
Cc: Jerome Glisse <jglisse@redhat.com>
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/ttm')
-rw-r--r-- | drivers/gpu/drm/ttm/ttm_bo.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/drivers/gpu/drm/ttm/ttm_bo.c b/drivers/gpu/drm/ttm/ttm_bo.c index 5ef0103bd0b6..9f2eed520fc3 100644 --- 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) | |||
166 | 166 | ||
167 | int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible) | 167 | int ttm_bo_wait_unreserved(struct ttm_buffer_object *bo, bool interruptible) |
168 | { | 168 | { |
169 | |||
170 | if (interruptible) { | 169 | if (interruptible) { |
171 | int ret = 0; | 170 | return wait_event_interruptible(bo->event_queue, |
172 | |||
173 | ret = wait_event_interruptible(bo->event_queue, | ||
174 | atomic_read(&bo->reserved) == 0); | 171 | atomic_read(&bo->reserved) == 0); |
175 | if (unlikely(ret != 0)) | ||
176 | return ret; | ||
177 | } else { | 172 | } else { |
178 | wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0); | 173 | wait_event(bo->event_queue, atomic_read(&bo->reserved) == 0); |
174 | return 0; | ||
179 | } | 175 | } |
180 | return 0; | ||
181 | } | 176 | } |
182 | EXPORT_SYMBOL(ttm_bo_wait_unreserved); | 177 | EXPORT_SYMBOL(ttm_bo_wait_unreserved); |
183 | 178 | ||