]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/powerpc/platforms/cell/spufs/sputrace.c
Merge branch 'release' of git://git.kernel.org/pub/scm/linux/kernel/git/lenb/linux...
[linux-2.6-omap-h63xx.git] / arch / powerpc / platforms / cell / spufs / sputrace.c
index 50cae0cf0988412db0ec1a0127967f6c2ef4e795..d0b1f3f4d9c887de9a902b4e511c0a2940a4aa02 100644 (file)
@@ -80,6 +80,11 @@ static ssize_t sputrace_read(struct file *file, char __user *buf,
                char tbuf[128];
                int width;
 
+               /* If we have data ready to return, don't block waiting
+                * for more */
+               if (cnt > 0 && sputrace_used() == 0)
+                       break;
+
                error = wait_event_interruptible(sputrace_wait,
                                                 sputrace_used() > 0);
                if (error)
@@ -258,6 +263,7 @@ static void __exit sputrace_exit(void)
 
        remove_proc_entry("sputrace", NULL);
        kfree(sputrace_log);
+       marker_synchronize_unregister();
 }
 
 module_init(sputrace_init);