Merge master.kernel.org:/pub/scm/linux/kernel/git/dtor/input
[pandora-kernel.git] / sound / pci / mixart / mixart.c
index 082c0d0..6c868d9 100644 (file)
@@ -445,9 +445,9 @@ static int snd_mixart_trigger(snd_pcm_substream_t *subs, int cmd)
 
 static int mixart_sync_nonblock_events(mixart_mgr_t *mgr)
 {
-       int timeout = HZ;
+       unsigned long timeout = jiffies + HZ;
        while (atomic_read(&mgr->msg_processed) > 0) {
-               if (! timeout--) {
+               if (time_after(jiffies, timeout)) {
                        snd_printk(KERN_ERR "mixart: cannot process nonblock events!\n");
                        return -EBUSY;
                }