aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/cell/spufs/sputrace.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/powerpc/platforms/cell/spufs/sputrace.c')
-rw-r--r--arch/powerpc/platforms/cell/spufs/sputrace.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/platforms/cell/spufs/sputrace.c b/arch/powerpc/platforms/cell/spufs/sputrace.c
index 50cae0cf0988..a2460e2e1928 100644
--- a/arch/powerpc/platforms/cell/spufs/sputrace.c
+++ b/arch/powerpc/platforms/cell/spufs/sputrace.c
@@ -80,6 +80,11 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
80 char tbuf[128]; 80 char tbuf[128];
81 int width; 81 int width;
82 82
83 /* If we have data ready to return, don't block waiting
84 * for more */
85 if (cnt > 0 && sputrace_used() == 0)
86 break;
87
83 error = wait_event_interruptible(sputrace_wait, 88 error = wait_event_interruptible(sputrace_wait,
84 sputrace_used() > 0); 89 sputrace_used() > 0);
85 if (error) 90 if (error)