diff options
author | Erik Gilling <konkers@android.com> | 2013-03-01 00:43:14 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2013-03-04 09:44:08 (GMT) |
commit | 3b640f5dd050f972439e5c67ba618a5377b61d34 (patch) | |
tree | 00c15856f5467c6ddf345873d6da7fd0a6ce5fc6 /drivers/staging/android/sync.c | |
parent | 03e7a503561f6d0ef09c7ec73772a7a6f78417d3 (diff) | |
download | linux-fsl-qoriq-3b640f5dd050f972439e5c67ba618a5377b61d34.tar.xz |
staging: sync: Change wait timeout to mirror poll semantics
Change wait timeout to act like poll
Cc: Maarten Lankhorst <maarten.lankhorst@canonical.com>
Cc: Erik Gilling <konkers@android.com>
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Cc: Rob Clark <robclark@gmail.com>
Cc: Sumit Semwal <sumit.semwal@linaro.org>
Cc: dri-devel@lists.freedesktop.org
Cc: Android Kernel Team <kernel-team@android.com>
Signed-off-by: Erik Gilling <konkers@android.com>
[jstultz: Added commit message, squished typo-fix]
Signed-off-by: John Stultz <john.stultz@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/staging/android/sync.c')
-rw-r--r-- | drivers/staging/android/sync.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/staging/android/sync.c b/drivers/staging/android/sync.c index c4a3c1d..7fccfcd 100644 --- a/drivers/staging/android/sync.c +++ b/drivers/staging/android/sync.c @@ -557,14 +557,14 @@ EXPORT_SYMBOL(sync_fence_cancel_async); int sync_fence_wait(struct sync_fence *fence, long timeout) { - int err; + int err = 0; - if (timeout) { + if (timeout > 0) { timeout = msecs_to_jiffies(timeout); err = wait_event_interruptible_timeout(fence->wq, fence->status != 0, timeout); - } else { + } else if (timeout < 0) { err = wait_event_interruptible(fence->wq, fence->status != 0); } |