Commit 90851fe9fad68db24da8cb497bad7327b97ed3d2

Authored by Hans Verkuil
Committed by Mauro Carvalho Chehab
1 parent f885969196

V4L/DVB (5843): ivtv: fix missing signal_pending check.

Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>

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

drivers/media/video/ivtv/ivtv-streams.c
... ... @@ -807,7 +807,6 @@
807 807 then = jiffies;
808 808 /* Make sure DMA is complete */
809 809 add_wait_queue(&s->waitq, &wait);
810   - set_current_state(TASK_INTERRUPTIBLE);
811 810 do {
812 811 /* check if DMA is pending */
813 812 if ((s->type == IVTV_ENC_STREAM_TYPE_MPG) && /* MPG Only */
... ... @@ -822,9 +821,7 @@
822 821 } else if (read_reg(IVTV_REG_DMASTATUS) & 0x02) {
823 822 break;
824 823 }
825   -
826   - ivtv_sleep_timeout(HZ / 100, 1);
827   - } while (then + HZ * 2 > jiffies);
  824 + } while (!ivtv_sleep_timeout(HZ / 100, 1) && then + HZ * 2 > jiffies);
828 825  
829 826 set_current_state(TASK_RUNNING);
830 827 remove_wait_queue(&s->waitq, &wait);