Merge branch 'sched-fixes-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[pandora-kernel.git] / drivers / media / video / v4l1-compat.c
index d450cab..b617bf0 100644 (file)
@@ -203,7 +203,6 @@ static int poll_one(struct file *file, struct poll_wqueues *pwq)
        table = &pwq->pt;
        for (;;) {
                int mask;
-               set_current_state(TASK_INTERRUPTIBLE);
                mask = file->f_op->poll(file, table);
                if (mask & POLLIN)
                        break;
@@ -212,9 +211,8 @@ static int poll_one(struct file *file, struct poll_wqueues *pwq)
                        retval = -ERESTARTSYS;
                        break;
                }
-               schedule();
+               poll_schedule(pwq, TASK_INTERRUPTIBLE);
        }
-       set_current_state(TASK_RUNNING);
        poll_freewait(pwq);
        return retval;
 }