Commit 688ec344a62e85f221d7a310a1209cf9b1209fd3

Authored by Axel Lin
Committed by Florian Tobias Schandinat
1 parent 79d3c41ae4

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>

Showing 1 changed file with 1 additions and 4 deletions Side-by-side Diff

drivers/video/pxa3xx-gcu.c
... ... @@ -316,11 +316,8 @@
316 316 ret = wait_event_interruptible_timeout(priv->wait_idle,
317 317 !priv->shared->hw_running, HZ*4);
318 318  
319   - if (ret < 0)
  319 + if (ret != 0)
320 320 break;
321   -
322   - if (ret > 0)
323   - continue;
324 321  
325 322 if (gc_readl(priv, REG_GCRBEXHR) == rbexhr &&
326 323 priv->shared->num_interrupts == num) {