diff options
author | Craig Stout <craig.stout@ti.com> | 2012-06-14 17:53:27 -0700 |
---|---|---|
committer | Ziyann <jaraidaniel@gmail.com> | 2014-10-01 13:00:49 +0200 |
commit | d3b323f92991f3072f0b7cce0254b8a4696f6fb3 (patch) | |
tree | b8ede1fdcef1820495d974bc748d518a0bd1d2df /drivers/misc | |
parent | 9f9d7380c1b4f8519cdf02d314c3366359d52585 (diff) | |
download | kernel_samsung_tuna-d3b323f92991f3072f0b7cce0254b8a4696f6fb3.zip kernel_samsung_tuna-d3b323f92991f3072f0b7cce0254b8a4696f6fb3.tar.gz kernel_samsung_tuna-d3b323f92991f3072f0b7cce0254b8a4696f6fb3.tar.bz2 |
gcx: make async callback thread interruptible
Change-Id: Id1a7e141841abd54521313c34489d651feba9f49
Signed-off-by: Craig Stout <craig.stout@ti.com>
Diffstat (limited to 'drivers/misc')
-rw-r--r-- | drivers/misc/gcx/gcioctl/gcif.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/drivers/misc/gcx/gcioctl/gcif.c b/drivers/misc/gcx/gcioctl/gcif.c index 971883e..3085d8b 100644 --- a/drivers/misc/gcx/gcioctl/gcif.c +++ b/drivers/misc/gcx/gcioctl/gcif.c @@ -766,11 +766,13 @@ static int gc_callback_wait(struct gccmdcallbackwait *gccmdcallbackwait) : msecs_to_jiffies(cpcmdcallbackwait.timeoutms); /* Wait until a callback is triggered. */ - GCWAIT_FOR_COMPLETION_TIMEOUT(timeout, - &gccallbackhandle->ready, - timeout); + timeout = wait_for_completion_interruptible_timeout( + &gccallbackhandle->ready, timeout); - if (timeout == 0) { + if (timeout < 0) + ret = timeout; + + else if (timeout == 0) { cpcmdcallbackwait.gcerror = GCERR_TIMEOUT; cpcmdcallbackwait.callback = NULL; cpcmdcallbackwait.callbackparam = NULL; |