diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-18 16:36:09 +0200 |
---|---|---|
committer | Hans Verkuil <hverkuil@xs4all.nl> | 2007-08-18 16:36:09 +0200 |
commit | 6751a7d4aab2b5bca085df2a0346e7d87724bede (patch) | |
tree | dfe82ffffb8d33c9affe1f241468c51136ffd15f /linux | |
parent | 96cbbc792854ad33325f55e2b095d27d195537e7 (diff) | |
download | mediapointer-dvb-s2-6751a7d4aab2b5bca085df2a0346e7d87724bede.tar.gz mediapointer-dvb-s2-6751a7d4aab2b5bca085df2a0346e7d87724bede.tar.bz2 |
ivtv: fix incorrect round-robin implementation
From: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Diffstat (limited to 'linux')
-rw-r--r-- | linux/drivers/media/video/ivtv/ivtv-irq.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/linux/drivers/media/video/ivtv/ivtv-irq.c b/linux/drivers/media/video/ivtv/ivtv-irq.c index 65622c1e4..f7bcdf74c 100644 --- a/linux/drivers/media/video/ivtv/ivtv-irq.c +++ b/linux/drivers/media/video/ivtv/ivtv-irq.c @@ -869,8 +869,9 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id) } if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_DMA, &itv->i_flags)) { + itv->irq_rr_idx++; for (i = 0; i < IVTV_MAX_STREAMS; i++) { - int idx = (i + itv->irq_rr_idx++) % IVTV_MAX_STREAMS; + int idx = (i + itv->irq_rr_idx) % IVTV_MAX_STREAMS; struct ivtv_stream *s = &itv->streams[idx]; if (!test_and_clear_bit(IVTV_F_S_DMA_PENDING, &s->s_flags)) @@ -887,8 +888,9 @@ irqreturn_t ivtv_irq_handler(int irq, void *dev_id) } if ((combo & IVTV_IRQ_DMA) && !test_bit(IVTV_F_I_PIO, &itv->i_flags)) { + itv->irq_rr_idx++; for (i = 0; i < IVTV_MAX_STREAMS; i++) { - int idx = (i + itv->irq_rr_idx++) % IVTV_MAX_STREAMS; + int idx = (i + itv->irq_rr_idx) % IVTV_MAX_STREAMS; struct ivtv_stream *s = &itv->streams[idx]; if (!test_and_clear_bit(IVTV_F_S_PIO_PENDING, &s->s_flags)) |