diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2009-05-02 10:10:23 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2009-05-09 17:53:10 -0400 |
commit | ec105a42ac397366e05888ea96503ab3b57f79ad (patch) | |
tree | bc2c4b7ae174b8aa247d87c3768d835a90afc19b /drivers/media/video/ivtv/ivtv-ioctl.c | |
parent | 7564f67d5b38eb814e67edd8ba0c70fd8eb475b6 (diff) |
V4L/DVB (11674): ivtv: fix incorrect bit tests
Found the coccinelle tool.
Thanks-to: Julia Lawall <julia@diku.dk>
Signed-off-by: Hans Verkuil <hverkuil@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/ivtv/ivtv-ioctl.c')
-rw-r--r-- | drivers/media/video/ivtv/ivtv-ioctl.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/media/video/ivtv/ivtv-ioctl.c b/drivers/media/video/ivtv/ivtv-ioctl.c index 4a2d464f055e..c342a9fe983e 100644 --- a/drivers/media/video/ivtv/ivtv-ioctl.c +++ b/drivers/media/video/ivtv/ivtv-ioctl.c | |||
@@ -180,7 +180,7 @@ int ivtv_set_speed(struct ivtv *itv, int speed) | |||
180 | 180 | ||
181 | /* Wait for any DMA to finish */ | 181 | /* Wait for any DMA to finish */ |
182 | prepare_to_wait(&itv->dma_waitq, &wait, TASK_INTERRUPTIBLE); | 182 | prepare_to_wait(&itv->dma_waitq, &wait, TASK_INTERRUPTIBLE); |
183 | while (itv->i_flags & IVTV_F_I_DMA) { | 183 | while (test_bit(IVTV_F_I_DMA, &itv->i_flags)) { |
184 | got_sig = signal_pending(current); | 184 | got_sig = signal_pending(current); |
185 | if (got_sig) | 185 | if (got_sig) |
186 | break; | 186 | break; |
@@ -1710,7 +1710,8 @@ static int ivtv_decoder_ioctls(struct file *filp, unsigned int cmd, void *arg) | |||
1710 | we are waiting unlock first and later lock again. */ | 1710 | we are waiting unlock first and later lock again. */ |
1711 | mutex_unlock(&itv->serialize_lock); | 1711 | mutex_unlock(&itv->serialize_lock); |
1712 | prepare_to_wait(&itv->event_waitq, &wait, TASK_INTERRUPTIBLE); | 1712 | prepare_to_wait(&itv->event_waitq, &wait, TASK_INTERRUPTIBLE); |
1713 | if ((itv->i_flags & (IVTV_F_I_EV_DEC_STOPPED|IVTV_F_I_EV_VSYNC)) == 0) | 1713 | if (!test_bit(IVTV_F_I_EV_DEC_STOPPED, &itv->i_flags) && |
1714 | !test_bit(IVTV_F_I_EV_VSYNC, &itv->i_flags)) | ||
1714 | schedule(); | 1715 | schedule(); |
1715 | finish_wait(&itv->event_waitq, &wait); | 1716 | finish_wait(&itv->event_waitq, &wait); |
1716 | mutex_lock(&itv->serialize_lock); | 1717 | mutex_lock(&itv->serialize_lock); |