diff options
author | Axel Lin <axel.lin@gmail.com> | 2012-03-27 07:15:56 +0400 |
---|---|---|
committer | Florian Tobias Schandinat <FlorianSchandinat@gmx.de> | 2012-04-09 20:18:15 +0400 |
commit | 688ec344a62e85f221d7a310a1209cf9b1209fd3 (patch) | |
tree | 7093b267778de07c518988d5b70a1f77294e3fce /drivers/video | |
parent | 79d3c41ae444fb064cc8aab7cb249f577d6e0aae (diff) | |
download | linux-688ec344a62e85f221d7a310a1209cf9b1209fd3.tar.xz |
video: pxa3xx-gcu: Simplify the logic to exit while loop in pxa3xx_gcu_wait_idle
If wait_event_interruptible_timeout returns a positive value, it means
the condition evaluated is true. Which means priv->shared->hw_running is false.
And then we will exit the loop.
This patch simplifies the logic to exit the while loop.
Signed-off-by: Axel Lin <axel.lin@gmail.com>
Signed-off-by: Florian Tobias Schandinat <FlorianSchandinat@gmx.de>
Diffstat (limited to 'drivers/video')
-rw-r--r-- | drivers/video/pxa3xx-gcu.c | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/video/pxa3xx-gcu.c b/drivers/video/pxa3xx-gcu.c index 1d71c08a818f..0b4ae0cebeda 100644 --- a/drivers/video/pxa3xx-gcu.c +++ b/drivers/video/pxa3xx-gcu.c @@ -316,12 +316,9 @@ pxa3xx_gcu_wait_idle(struct pxa3xx_gcu_priv *priv) ret = wait_event_interruptible_timeout(priv->wait_idle, !priv->shared->hw_running, HZ*4); - if (ret < 0) + if (ret != 0) break; - if (ret > 0) - continue; - if (gc_readl(priv, REG_GCRBEXHR) == rbexhr && priv->shared->num_interrupts == num) { QERROR("TIMEOUT"); |