diff options
43 files changed, 61 insertions, 70 deletions
diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c index b3890bd49df6..2652f9155c34 100644 --- a/drivers/media/common/saa7146/saa7146_fops.c +++ b/drivers/media/common/saa7146/saa7146_fops.c | |||
@@ -105,7 +105,7 @@ void saa7146_buffer_finish(struct saa7146_dev *dev, | |||
105 | } | 105 | } |
106 | 106 | ||
107 | q->curr->vb.state = state; | 107 | q->curr->vb.state = state; |
108 | do_gettimeofday(&q->curr->vb.ts); | 108 | v4l2_get_timestamp(&q->curr->vb.ts); |
109 | wake_up(&q->curr->vb.done); | 109 | wake_up(&q->curr->vb.done); |
110 | 110 | ||
111 | q->curr = NULL; | 111 | q->curr = NULL; |
diff --git a/drivers/media/pci/bt8xx/bttv-driver.c b/drivers/media/pci/bt8xx/bttv-driver.c index de6f41f19187..346458bba2c5 100644 --- a/drivers/media/pci/bt8xx/bttv-driver.c +++ b/drivers/media/pci/bt8xx/bttv-driver.c | |||
@@ -3835,7 +3835,7 @@ bttv_irq_wakeup_video(struct bttv *btv, struct bttv_buffer_set *wakeup, | |||
3835 | { | 3835 | { |
3836 | struct timeval ts; | 3836 | struct timeval ts; |
3837 | 3837 | ||
3838 | do_gettimeofday(&ts); | 3838 | v4l2_get_timestamp(&ts); |
3839 | 3839 | ||
3840 | if (wakeup->top == wakeup->bottom) { | 3840 | if (wakeup->top == wakeup->bottom) { |
3841 | if (NULL != wakeup->top && curr->top != wakeup->top) { | 3841 | if (NULL != wakeup->top && curr->top != wakeup->top) { |
@@ -3878,7 +3878,7 @@ bttv_irq_wakeup_vbi(struct bttv *btv, struct bttv_buffer *wakeup, | |||
3878 | if (NULL == wakeup) | 3878 | if (NULL == wakeup) |
3879 | return; | 3879 | return; |
3880 | 3880 | ||
3881 | do_gettimeofday(&ts); | 3881 | v4l2_get_timestamp(&ts); |
3882 | wakeup->vb.ts = ts; | 3882 | wakeup->vb.ts = ts; |
3883 | wakeup->vb.field_count = btv->field_count; | 3883 | wakeup->vb.field_count = btv->field_count; |
3884 | wakeup->vb.state = state; | 3884 | wakeup->vb.state = state; |
@@ -3949,7 +3949,7 @@ bttv_irq_wakeup_top(struct bttv *btv) | |||
3949 | btv->curr.top = NULL; | 3949 | btv->curr.top = NULL; |
3950 | bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0); | 3950 | bttv_risc_hook(btv, RISC_SLOT_O_FIELD, NULL, 0); |
3951 | 3951 | ||
3952 | do_gettimeofday(&wakeup->vb.ts); | 3952 | v4l2_get_timestamp(&wakeup->vb.ts); |
3953 | wakeup->vb.field_count = btv->field_count; | 3953 | wakeup->vb.field_count = btv->field_count; |
3954 | wakeup->vb.state = VIDEOBUF_DONE; | 3954 | wakeup->vb.state = VIDEOBUF_DONE; |
3955 | wake_up(&wakeup->vb.done); | 3955 | wake_up(&wakeup->vb.done); |
diff --git a/drivers/media/pci/cx23885/cx23885-core.c b/drivers/media/pci/cx23885/cx23885-core.c index 065ecd54bda3..c7572594d434 100644 --- a/drivers/media/pci/cx23885/cx23885-core.c +++ b/drivers/media/pci/cx23885/cx23885-core.c | |||
@@ -439,7 +439,7 @@ void cx23885_wakeup(struct cx23885_tsport *port, | |||
439 | if ((s16) (count - buf->count) < 0) | 439 | if ((s16) (count - buf->count) < 0) |
440 | break; | 440 | break; |
441 | 441 | ||
442 | do_gettimeofday(&buf->vb.ts); | 442 | v4l2_get_timestamp(&buf->vb.ts); |
443 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, | 443 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, |
444 | count, buf->count); | 444 | count, buf->count); |
445 | buf->vb.state = VIDEOBUF_DONE; | 445 | buf->vb.state = VIDEOBUF_DONE; |
diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index 1a21926ca412..83975313e0f2 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c | |||
@@ -300,7 +300,7 @@ void cx23885_video_wakeup(struct cx23885_dev *dev, | |||
300 | if ((s16) (count - buf->count) < 0) | 300 | if ((s16) (count - buf->count) < 0) |
301 | break; | 301 | break; |
302 | 302 | ||
303 | do_gettimeofday(&buf->vb.ts); | 303 | v4l2_get_timestamp(&buf->vb.ts); |
304 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, | 304 | dprintk(2, "[%p/%d] wakeup reg=%d buf=%d\n", buf, buf->vb.i, |
305 | count, buf->count); | 305 | count, buf->count); |
306 | buf->vb.state = VIDEOBUF_DONE; | 306 | buf->vb.state = VIDEOBUF_DONE; |
diff --git a/drivers/media/pci/cx25821/cx25821-video.c b/drivers/media/pci/cx25821/cx25821-video.c index 53b16dd70320..d4de021dc844 100644 --- a/drivers/media/pci/cx25821/cx25821-video.c +++ b/drivers/media/pci/cx25821/cx25821-video.c | |||
@@ -130,7 +130,7 @@ void cx25821_video_wakeup(struct cx25821_dev *dev, struct cx25821_dmaqueue *q, | |||
130 | if ((s16) (count - buf->count) < 0) | 130 | if ((s16) (count - buf->count) < 0) |
131 | break; | 131 | break; |
132 | 132 | ||
133 | do_gettimeofday(&buf->vb.ts); | 133 | v4l2_get_timestamp(&buf->vb.ts); |
134 | buf->vb.state = VIDEOBUF_DONE; | 134 | buf->vb.state = VIDEOBUF_DONE; |
135 | list_del(&buf->vb.queue); | 135 | list_del(&buf->vb.queue); |
136 | wake_up(&buf->vb.done); | 136 | wake_up(&buf->vb.done); |
diff --git a/drivers/media/pci/cx88/cx88-core.c b/drivers/media/pci/cx88/cx88-core.c index 19a58754c6e1..39f095c37ffd 100644 --- a/drivers/media/pci/cx88/cx88-core.c +++ b/drivers/media/pci/cx88/cx88-core.c | |||
@@ -549,7 +549,7 @@ void cx88_wakeup(struct cx88_core *core, | |||
549 | * up to 32767 buffers in flight... */ | 549 | * up to 32767 buffers in flight... */ |
550 | if ((s16) (count - buf->count) < 0) | 550 | if ((s16) (count - buf->count) < 0) |
551 | break; | 551 | break; |
552 | do_gettimeofday(&buf->vb.ts); | 552 | v4l2_get_timestamp(&buf->vb.ts); |
553 | dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i, | 553 | dprintk(2,"[%p/%d] wakeup reg=%d buf=%d\n",buf,buf->vb.i, |
554 | count, buf->count); | 554 | count, buf->count); |
555 | buf->vb.state = VIDEOBUF_DONE; | 555 | buf->vb.state = VIDEOBUF_DONE; |
diff --git a/drivers/media/pci/meye/meye.c b/drivers/media/pci/meye/meye.c index ae7d32027bf7..288adea55e33 100644 --- a/drivers/media/pci/meye/meye.c +++ b/drivers/media/pci/meye/meye.c | |||
@@ -811,7 +811,7 @@ again: | |||
811 | mchip_hsize() * mchip_vsize() * 2); | 811 | mchip_hsize() * mchip_vsize() * 2); |
812 | meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2; | 812 | meye.grab_buffer[reqnr].size = mchip_hsize() * mchip_vsize() * 2; |
813 | meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; | 813 | meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; |
814 | do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); | 814 | v4l2_get_timestamp(&meye.grab_buffer[reqnr].timestamp); |
815 | meye.grab_buffer[reqnr].sequence = sequence++; | 815 | meye.grab_buffer[reqnr].sequence = sequence++; |
816 | kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, | 816 | kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, |
817 | sizeof(int), &meye.doneq_lock); | 817 | sizeof(int), &meye.doneq_lock); |
@@ -832,7 +832,7 @@ again: | |||
832 | size); | 832 | size); |
833 | meye.grab_buffer[reqnr].size = size; | 833 | meye.grab_buffer[reqnr].size = size; |
834 | meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; | 834 | meye.grab_buffer[reqnr].state = MEYE_BUF_DONE; |
835 | do_gettimeofday(&meye.grab_buffer[reqnr].timestamp); | 835 | v4l2_get_timestamp(&meye.grab_buffer[reqnr].timestamp); |
836 | meye.grab_buffer[reqnr].sequence = sequence++; | 836 | meye.grab_buffer[reqnr].sequence = sequence++; |
837 | kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, | 837 | kfifo_in_locked(&meye.doneq, (unsigned char *)&reqnr, |
838 | sizeof(int), &meye.doneq_lock); | 838 | sizeof(int), &meye.doneq_lock); |
diff --git a/drivers/media/pci/saa7134/saa7134-core.c b/drivers/media/pci/saa7134/saa7134-core.c index 8976d0e65813..e1aeb51e25ba 100644 --- a/drivers/media/pci/saa7134/saa7134-core.c +++ b/drivers/media/pci/saa7134/saa7134-core.c | |||
@@ -308,7 +308,7 @@ void saa7134_buffer_finish(struct saa7134_dev *dev, | |||
308 | 308 | ||
309 | /* finish current buffer */ | 309 | /* finish current buffer */ |
310 | q->curr->vb.state = state; | 310 | q->curr->vb.state = state; |
311 | do_gettimeofday(&q->curr->vb.ts); | 311 | v4l2_get_timestamp(&q->curr->vb.ts); |
312 | wake_up(&q->curr->vb.done); | 312 | wake_up(&q->curr->vb.done); |
313 | q->curr = NULL; | 313 | q->curr = NULL; |
314 | } | 314 | } |
diff --git a/drivers/media/pci/sta2x11/sta2x11_vip.c b/drivers/media/pci/sta2x11/sta2x11_vip.c index 4c10205264d4..ed1337a89a26 100644 --- a/drivers/media/pci/sta2x11/sta2x11_vip.c +++ b/drivers/media/pci/sta2x11/sta2x11_vip.c | |||
@@ -1088,7 +1088,7 @@ static irqreturn_t vip_irq(int irq, struct sta2x11_vip *vip) | |||
1088 | 1088 | ||
1089 | REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) & ~DVP_CTL_ENA); | 1089 | REG_WRITE(vip, DVP_CTL, REG_READ(vip, DVP_CTL) & ~DVP_CTL_ENA); |
1090 | if (vip->active) { | 1090 | if (vip->active) { |
1091 | do_gettimeofday(&vip->active->ts); | 1091 | v4l2_get_timestamp(&vip->active->ts); |
1092 | vip->active->field_count++; | 1092 | vip->active->field_count++; |
1093 | vip->active->state = VIDEOBUF_DONE; | 1093 | vip->active->state = VIDEOBUF_DONE; |
1094 | wake_up(&vip->active->done); | 1094 | wake_up(&vip->active->done); |
diff --git a/drivers/media/pci/zoran/zoran_device.c b/drivers/media/pci/zoran/zoran_device.c index a4cd504b8eee..519164c572c8 100644 --- a/drivers/media/pci/zoran/zoran_device.c +++ b/drivers/media/pci/zoran/zoran_device.c | |||
@@ -1169,7 +1169,7 @@ zoran_reap_stat_com (struct zoran *zr) | |||
1169 | } | 1169 | } |
1170 | frame = zr->jpg_pend[zr->jpg_dma_tail & BUZ_MASK_FRAME]; | 1170 | frame = zr->jpg_pend[zr->jpg_dma_tail & BUZ_MASK_FRAME]; |
1171 | buffer = &zr->jpg_buffers.buffer[frame]; | 1171 | buffer = &zr->jpg_buffers.buffer[frame]; |
1172 | do_gettimeofday(&buffer->bs.timestamp); | 1172 | v4l2_get_timestamp(&buffer->bs.timestamp); |
1173 | 1173 | ||
1174 | if (zr->codec_mode == BUZ_MODE_MOTION_COMPRESS) { | 1174 | if (zr->codec_mode == BUZ_MODE_MOTION_COMPRESS) { |
1175 | buffer->bs.length = (stat_com & 0x7fffff) >> 1; | 1175 | buffer->bs.length = (stat_com & 0x7fffff) >> 1; |
@@ -1407,7 +1407,7 @@ zoran_irq (int irq, | |||
1407 | 1407 | ||
1408 | zr->v4l_buffers.buffer[zr->v4l_grab_frame].state = BUZ_STATE_DONE; | 1408 | zr->v4l_buffers.buffer[zr->v4l_grab_frame].state = BUZ_STATE_DONE; |
1409 | zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.seq = zr->v4l_grab_seq; | 1409 | zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.seq = zr->v4l_grab_seq; |
1410 | do_gettimeofday(&zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.timestamp); | 1410 | v4l2_get_timestamp(&zr->v4l_buffers.buffer[zr->v4l_grab_frame].bs.timestamp); |
1411 | zr->v4l_grab_frame = NO_GRAB_ACTIVE; | 1411 | zr->v4l_grab_frame = NO_GRAB_ACTIVE; |
1412 | zr->v4l_pend_tail++; | 1412 | zr->v4l_pend_tail++; |
1413 | } | 1413 | } |
diff --git a/drivers/media/platform/blackfin/bfin_capture.c b/drivers/media/platform/blackfin/bfin_capture.c index ec476ef5b709..d422d3c379e4 100644 --- a/drivers/media/platform/blackfin/bfin_capture.c +++ b/drivers/media/platform/blackfin/bfin_capture.c | |||
@@ -484,15 +484,13 @@ static irqreturn_t bcap_isr(int irq, void *dev_id) | |||
484 | { | 484 | { |
485 | struct ppi_if *ppi = dev_id; | 485 | struct ppi_if *ppi = dev_id; |
486 | struct bcap_device *bcap_dev = ppi->priv; | 486 | struct bcap_device *bcap_dev = ppi->priv; |
487 | struct timeval timevalue; | ||
488 | struct vb2_buffer *vb = &bcap_dev->cur_frm->vb; | 487 | struct vb2_buffer *vb = &bcap_dev->cur_frm->vb; |
489 | dma_addr_t addr; | 488 | dma_addr_t addr; |
490 | 489 | ||
491 | spin_lock(&bcap_dev->lock); | 490 | spin_lock(&bcap_dev->lock); |
492 | 491 | ||
493 | if (bcap_dev->cur_frm != bcap_dev->next_frm) { | 492 | if (bcap_dev->cur_frm != bcap_dev->next_frm) { |
494 | do_gettimeofday(&timevalue); | 493 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
495 | vb->v4l2_buf.timestamp = timevalue; | ||
496 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); | 494 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); |
497 | bcap_dev->cur_frm = bcap_dev->next_frm; | 495 | bcap_dev->cur_frm = bcap_dev->next_frm; |
498 | } | 496 | } |
diff --git a/drivers/media/platform/davinci/vpfe_capture.c b/drivers/media/platform/davinci/vpfe_capture.c index 8be492cd8ed4..65f4264bd5b4 100644 --- a/drivers/media/platform/davinci/vpfe_capture.c +++ b/drivers/media/platform/davinci/vpfe_capture.c | |||
@@ -560,10 +560,7 @@ static void vpfe_schedule_bottom_field(struct vpfe_device *vpfe_dev) | |||
560 | 560 | ||
561 | static void vpfe_process_buffer_complete(struct vpfe_device *vpfe_dev) | 561 | static void vpfe_process_buffer_complete(struct vpfe_device *vpfe_dev) |
562 | { | 562 | { |
563 | struct timeval timevalue; | 563 | v4l2_get_timestamp(&vpfe_dev->cur_frm->ts); |
564 | |||
565 | do_gettimeofday(&timevalue); | ||
566 | vpfe_dev->cur_frm->ts = timevalue; | ||
567 | vpfe_dev->cur_frm->state = VIDEOBUF_DONE; | 564 | vpfe_dev->cur_frm->state = VIDEOBUF_DONE; |
568 | vpfe_dev->cur_frm->size = vpfe_dev->fmt.fmt.pix.sizeimage; | 565 | vpfe_dev->cur_frm->size = vpfe_dev->fmt.fmt.pix.sizeimage; |
569 | wake_up_interruptible(&vpfe_dev->cur_frm->done); | 566 | wake_up_interruptible(&vpfe_dev->cur_frm->done); |
diff --git a/drivers/media/platform/davinci/vpif_capture.c b/drivers/media/platform/davinci/vpif_capture.c index a409ccefb380..5892d2bc8eee 100644 --- a/drivers/media/platform/davinci/vpif_capture.c +++ b/drivers/media/platform/davinci/vpif_capture.c | |||
@@ -411,7 +411,7 @@ static struct vb2_ops video_qops = { | |||
411 | */ | 411 | */ |
412 | static void vpif_process_buffer_complete(struct common_obj *common) | 412 | static void vpif_process_buffer_complete(struct common_obj *common) |
413 | { | 413 | { |
414 | do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); | 414 | v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp); |
415 | vb2_buffer_done(&common->cur_frm->vb, | 415 | vb2_buffer_done(&common->cur_frm->vb, |
416 | VB2_BUF_STATE_DONE); | 416 | VB2_BUF_STATE_DONE); |
417 | /* Make curFrm pointing to nextFrm */ | 417 | /* Make curFrm pointing to nextFrm */ |
diff --git a/drivers/media/platform/davinci/vpif_display.c b/drivers/media/platform/davinci/vpif_display.c index 9f2b603be9c9..dd249c96126d 100644 --- a/drivers/media/platform/davinci/vpif_display.c +++ b/drivers/media/platform/davinci/vpif_display.c | |||
@@ -402,7 +402,7 @@ static void process_interlaced_mode(int fid, struct common_obj *common) | |||
402 | /* one frame is displayed If next frame is | 402 | /* one frame is displayed If next frame is |
403 | * available, release cur_frm and move on */ | 403 | * available, release cur_frm and move on */ |
404 | /* Copy frame display time */ | 404 | /* Copy frame display time */ |
405 | do_gettimeofday(&common->cur_frm->vb.v4l2_buf.timestamp); | 405 | v4l2_get_timestamp(&common->cur_frm->vb.v4l2_buf.timestamp); |
406 | /* Change status of the cur_frm */ | 406 | /* Change status of the cur_frm */ |
407 | vb2_buffer_done(&common->cur_frm->vb, | 407 | vb2_buffer_done(&common->cur_frm->vb, |
408 | VB2_BUF_STATE_DONE); | 408 | VB2_BUF_STATE_DONE); |
@@ -462,8 +462,8 @@ static irqreturn_t vpif_channel_isr(int irq, void *dev_id) | |||
462 | if (!channel_first_int[i][channel_id]) { | 462 | if (!channel_first_int[i][channel_id]) { |
463 | /* Mark status of the cur_frm to | 463 | /* Mark status of the cur_frm to |
464 | * done and unlock semaphore on it */ | 464 | * done and unlock semaphore on it */ |
465 | do_gettimeofday(&common->cur_frm->vb. | 465 | v4l2_get_timestamp(&common->cur_frm->vb. |
466 | v4l2_buf.timestamp); | 466 | v4l2_buf.timestamp); |
467 | vb2_buffer_done(&common->cur_frm->vb, | 467 | vb2_buffer_done(&common->cur_frm->vb, |
468 | VB2_BUF_STATE_DONE); | 468 | VB2_BUF_STATE_DONE); |
469 | /* Make cur_frm pointing to next_frm */ | 469 | /* Make cur_frm pointing to next_frm */ |
diff --git a/drivers/media/platform/fsl-viu.c b/drivers/media/platform/fsl-viu.c index a8ddb0cacab8..d464509d0f0e 100644 --- a/drivers/media/platform/fsl-viu.c +++ b/drivers/media/platform/fsl-viu.c | |||
@@ -1181,7 +1181,7 @@ static void viu_capture_intr(struct viu_dev *dev, u32 status) | |||
1181 | 1181 | ||
1182 | if (waitqueue_active(&buf->vb.done)) { | 1182 | if (waitqueue_active(&buf->vb.done)) { |
1183 | list_del(&buf->vb.queue); | 1183 | list_del(&buf->vb.queue); |
1184 | do_gettimeofday(&buf->vb.ts); | 1184 | v4l2_get_timestamp(&buf->vb.ts); |
1185 | buf->vb.state = VIDEOBUF_DONE; | 1185 | buf->vb.state = VIDEOBUF_DONE; |
1186 | buf->vb.field_count++; | 1186 | buf->vb.field_count++; |
1187 | wake_up(&buf->vb.done); | 1187 | wake_up(&buf->vb.done); |
diff --git a/drivers/media/platform/omap/omap_vout.c b/drivers/media/platform/omap/omap_vout.c index f7ad54106bc5..c74b0d48dcd6 100644 --- a/drivers/media/platform/omap/omap_vout.c +++ b/drivers/media/platform/omap/omap_vout.c | |||
@@ -597,7 +597,7 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus) | |||
597 | return; | 597 | return; |
598 | 598 | ||
599 | spin_lock(&vout->vbq_lock); | 599 | spin_lock(&vout->vbq_lock); |
600 | do_gettimeofday(&timevalue); | 600 | v4l2_get_timestamp(&timevalue); |
601 | 601 | ||
602 | switch (cur_display->type) { | 602 | switch (cur_display->type) { |
603 | case OMAP_DISPLAY_TYPE_DSI: | 603 | case OMAP_DISPLAY_TYPE_DSI: |
diff --git a/drivers/media/platform/omap24xxcam.c b/drivers/media/platform/omap24xxcam.c index 70f45c381318..eda3274abf8e 100644 --- a/drivers/media/platform/omap24xxcam.c +++ b/drivers/media/platform/omap24xxcam.c | |||
@@ -402,7 +402,7 @@ static void omap24xxcam_vbq_complete(struct omap24xxcam_sgdma *sgdma, | |||
402 | omap24xxcam_core_disable(cam); | 402 | omap24xxcam_core_disable(cam); |
403 | spin_unlock_irqrestore(&cam->core_enable_disable_lock, flags); | 403 | spin_unlock_irqrestore(&cam->core_enable_disable_lock, flags); |
404 | 404 | ||
405 | do_gettimeofday(&vb->ts); | 405 | v4l2_get_timestamp(&vb->ts); |
406 | vb->field_count = atomic_add_return(2, &fh->field_count); | 406 | vb->field_count = atomic_add_return(2, &fh->field_count); |
407 | if (csr & csr_error) { | 407 | if (csr & csr_error) { |
408 | vb->state = VIDEOBUF_ERROR; | 408 | vb->state = VIDEOBUF_ERROR; |
diff --git a/drivers/media/platform/sh_vou.c b/drivers/media/platform/sh_vou.c index 7494858a2158..1039ae82401b 100644 --- a/drivers/media/platform/sh_vou.c +++ b/drivers/media/platform/sh_vou.c | |||
@@ -1092,7 +1092,7 @@ static irqreturn_t sh_vou_isr(int irq, void *dev_id) | |||
1092 | list_del(&vb->queue); | 1092 | list_del(&vb->queue); |
1093 | 1093 | ||
1094 | vb->state = VIDEOBUF_DONE; | 1094 | vb->state = VIDEOBUF_DONE; |
1095 | do_gettimeofday(&vb->ts); | 1095 | v4l2_get_timestamp(&vb->ts); |
1096 | vb->field_count++; | 1096 | vb->field_count++; |
1097 | wake_up(&vb->done); | 1097 | wake_up(&vb->done); |
1098 | 1098 | ||
diff --git a/drivers/media/platform/soc_camera/atmel-isi.c b/drivers/media/platform/soc_camera/atmel-isi.c index 6274a91c25c7..c8d748a31944 100644 --- a/drivers/media/platform/soc_camera/atmel-isi.c +++ b/drivers/media/platform/soc_camera/atmel-isi.c | |||
@@ -166,7 +166,7 @@ static irqreturn_t atmel_isi_handle_streaming(struct atmel_isi *isi) | |||
166 | struct frame_buffer *buf = isi->active; | 166 | struct frame_buffer *buf = isi->active; |
167 | 167 | ||
168 | list_del_init(&buf->list); | 168 | list_del_init(&buf->list); |
169 | do_gettimeofday(&vb->v4l2_buf.timestamp); | 169 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
170 | vb->v4l2_buf.sequence = isi->sequence++; | 170 | vb->v4l2_buf.sequence = isi->sequence++; |
171 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); | 171 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); |
172 | } | 172 | } |
diff --git a/drivers/media/platform/soc_camera/mx1_camera.c b/drivers/media/platform/soc_camera/mx1_camera.c index 032b8c9097f9..674ded646b66 100644 --- a/drivers/media/platform/soc_camera/mx1_camera.c +++ b/drivers/media/platform/soc_camera/mx1_camera.c | |||
@@ -307,7 +307,7 @@ static void mx1_camera_wakeup(struct mx1_camera_dev *pcdev, | |||
307 | /* _init is used to debug races, see comment in mx1_camera_reqbufs() */ | 307 | /* _init is used to debug races, see comment in mx1_camera_reqbufs() */ |
308 | list_del_init(&vb->queue); | 308 | list_del_init(&vb->queue); |
309 | vb->state = VIDEOBUF_DONE; | 309 | vb->state = VIDEOBUF_DONE; |
310 | do_gettimeofday(&vb->ts); | 310 | v4l2_get_timestamp(&vb->ts); |
311 | vb->field_count++; | 311 | vb->field_count++; |
312 | wake_up(&vb->done); | 312 | wake_up(&vb->done); |
313 | 313 | ||
diff --git a/drivers/media/platform/soc_camera/mx2_camera.c b/drivers/media/platform/soc_camera/mx2_camera.c index 2c148028d8c0..3c5ba63cd311 100644 --- a/drivers/media/platform/soc_camera/mx2_camera.c +++ b/drivers/media/platform/soc_camera/mx2_camera.c | |||
@@ -516,7 +516,7 @@ static void mx25_camera_frame_done(struct mx2_camera_dev *pcdev, int fb, | |||
516 | dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%p %lu\n", __func__, | 516 | dev_dbg(pcdev->dev, "%s (vb=0x%p) 0x%p %lu\n", __func__, |
517 | vb, vb2_plane_vaddr(vb, 0), vb2_get_plane_payload(vb, 0)); | 517 | vb, vb2_plane_vaddr(vb, 0), vb2_get_plane_payload(vb, 0)); |
518 | 518 | ||
519 | do_gettimeofday(&vb->v4l2_buf.timestamp); | 519 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
520 | vb->v4l2_buf.sequence++; | 520 | vb->v4l2_buf.sequence++; |
521 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); | 521 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); |
522 | 522 | ||
@@ -1561,7 +1561,7 @@ static void mx27_camera_frame_done_emma(struct mx2_camera_dev *pcdev, | |||
1561 | vb2_get_plane_payload(vb, 0)); | 1561 | vb2_get_plane_payload(vb, 0)); |
1562 | 1562 | ||
1563 | list_del_init(&buf->internal.queue); | 1563 | list_del_init(&buf->internal.queue); |
1564 | do_gettimeofday(&vb->v4l2_buf.timestamp); | 1564 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
1565 | vb->v4l2_buf.sequence = pcdev->frame_count; | 1565 | vb->v4l2_buf.sequence = pcdev->frame_count; |
1566 | if (err) | 1566 | if (err) |
1567 | vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); | 1567 | vb2_buffer_done(vb, VB2_BUF_STATE_ERROR); |
diff --git a/drivers/media/platform/soc_camera/mx3_camera.c b/drivers/media/platform/soc_camera/mx3_camera.c index 261f6e9e1b17..e6bc06bca496 100644 --- a/drivers/media/platform/soc_camera/mx3_camera.c +++ b/drivers/media/platform/soc_camera/mx3_camera.c | |||
@@ -156,7 +156,7 @@ static void mx3_cam_dma_done(void *arg) | |||
156 | struct mx3_camera_buffer *buf = to_mx3_vb(vb); | 156 | struct mx3_camera_buffer *buf = to_mx3_vb(vb); |
157 | 157 | ||
158 | list_del_init(&buf->queue); | 158 | list_del_init(&buf->queue); |
159 | do_gettimeofday(&vb->v4l2_buf.timestamp); | 159 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
160 | vb->v4l2_buf.field = mx3_cam->field; | 160 | vb->v4l2_buf.field = mx3_cam->field; |
161 | vb->v4l2_buf.sequence = mx3_cam->sequence++; | 161 | vb->v4l2_buf.sequence = mx3_cam->sequence++; |
162 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); | 162 | vb2_buffer_done(vb, VB2_BUF_STATE_DONE); |
diff --git a/drivers/media/platform/soc_camera/omap1_camera.c b/drivers/media/platform/soc_camera/omap1_camera.c index 13636a585106..b573bd5899de 100644 --- a/drivers/media/platform/soc_camera/omap1_camera.c +++ b/drivers/media/platform/soc_camera/omap1_camera.c | |||
@@ -591,7 +591,7 @@ static void videobuf_done(struct omap1_cam_dev *pcdev, | |||
591 | suspend_capture(pcdev); | 591 | suspend_capture(pcdev); |
592 | } | 592 | } |
593 | vb->state = result; | 593 | vb->state = result; |
594 | do_gettimeofday(&vb->ts); | 594 | v4l2_get_timestamp(&vb->ts); |
595 | if (result != VIDEOBUF_ERROR) | 595 | if (result != VIDEOBUF_ERROR) |
596 | vb->field_count++; | 596 | vb->field_count++; |
597 | wake_up(&vb->done); | 597 | wake_up(&vb->done); |
diff --git a/drivers/media/platform/soc_camera/pxa_camera.c b/drivers/media/platform/soc_camera/pxa_camera.c index 3434ffe79c6e..8ff961eec39d 100644 --- a/drivers/media/platform/soc_camera/pxa_camera.c +++ b/drivers/media/platform/soc_camera/pxa_camera.c | |||
@@ -681,7 +681,7 @@ static void pxa_camera_wakeup(struct pxa_camera_dev *pcdev, | |||
681 | /* _init is used to debug races, see comment in pxa_camera_reqbufs() */ | 681 | /* _init is used to debug races, see comment in pxa_camera_reqbufs() */ |
682 | list_del_init(&vb->queue); | 682 | list_del_init(&vb->queue); |
683 | vb->state = VIDEOBUF_DONE; | 683 | vb->state = VIDEOBUF_DONE; |
684 | do_gettimeofday(&vb->ts); | 684 | v4l2_get_timestamp(&vb->ts); |
685 | vb->field_count++; | 685 | vb->field_count++; |
686 | wake_up(&vb->done); | 686 | wake_up(&vb->done); |
687 | dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s dequeud buffer (vb=0x%p)\n", | 687 | dev_dbg(pcdev->soc_host.v4l2_dev.dev, "%s dequeud buffer (vb=0x%p)\n", |
diff --git a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c index 27eeca15bbf0..9f021043cfe6 100644 --- a/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c +++ b/drivers/media/platform/soc_camera/sh_mobile_ceu_camera.c | |||
@@ -516,7 +516,7 @@ static irqreturn_t sh_mobile_ceu_irq(int irq, void *data) | |||
516 | pcdev->active = NULL; | 516 | pcdev->active = NULL; |
517 | 517 | ||
518 | ret = sh_mobile_ceu_capture(pcdev); | 518 | ret = sh_mobile_ceu_capture(pcdev); |
519 | do_gettimeofday(&vb->v4l2_buf.timestamp); | 519 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); |
520 | if (!ret) { | 520 | if (!ret) { |
521 | vb->v4l2_buf.field = pcdev->field; | 521 | vb->v4l2_buf.field = pcdev->field; |
522 | vb->v4l2_buf.sequence = pcdev->sequence++; | 522 | vb->v4l2_buf.sequence = pcdev->sequence++; |
diff --git a/drivers/media/platform/timblogiw.c b/drivers/media/platform/timblogiw.c index 02194c056b00..9de014100a0f 100644 --- a/drivers/media/platform/timblogiw.c +++ b/drivers/media/platform/timblogiw.c | |||
@@ -130,7 +130,7 @@ static void timblogiw_dma_cb(void *data) | |||
130 | 130 | ||
131 | if (vb->state != VIDEOBUF_ERROR) { | 131 | if (vb->state != VIDEOBUF_ERROR) { |
132 | list_del(&vb->queue); | 132 | list_del(&vb->queue); |
133 | do_gettimeofday(&vb->ts); | 133 | v4l2_get_timestamp(&vb->ts); |
134 | vb->field_count = fh->frame_count * 2; | 134 | vb->field_count = fh->frame_count * 2; |
135 | vb->state = VIDEOBUF_DONE; | 135 | vb->state = VIDEOBUF_DONE; |
136 | 136 | ||
diff --git a/drivers/media/platform/vino.c b/drivers/media/platform/vino.c index 70b0bf4b2900..28350e78b564 100644 --- a/drivers/media/platform/vino.c +++ b/drivers/media/platform/vino.c | |||
@@ -2474,8 +2474,8 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) | |||
2474 | 2474 | ||
2475 | if ((!handled_a) && (done_a || skip_a)) { | 2475 | if ((!handled_a) && (done_a || skip_a)) { |
2476 | if (!skip_a) { | 2476 | if (!skip_a) { |
2477 | do_gettimeofday(&vino_drvdata-> | 2477 | v4l2_get_timestamp( |
2478 | a.int_data.timestamp); | 2478 | &vino_drvdata->a.int_data.timestamp); |
2479 | vino_drvdata->a.int_data.frame_counter = fc_a; | 2479 | vino_drvdata->a.int_data.frame_counter = fc_a; |
2480 | } | 2480 | } |
2481 | vino_drvdata->a.int_data.skip = skip_a; | 2481 | vino_drvdata->a.int_data.skip = skip_a; |
@@ -2489,8 +2489,8 @@ static irqreturn_t vino_interrupt(int irq, void *dev_id) | |||
2489 | 2489 | ||
2490 | if ((!handled_b) && (done_b || skip_b)) { | 2490 | if ((!handled_b) && (done_b || skip_b)) { |
2491 | if (!skip_b) { | 2491 | if (!skip_b) { |
2492 | do_gettimeofday(&vino_drvdata-> | 2492 | v4l2_get_timestamp( |
2493 | b.int_data.timestamp); | 2493 | &vino_drvdata->b.int_data.timestamp); |
2494 | vino_drvdata->b.int_data.frame_counter = fc_b; | 2494 | vino_drvdata->b.int_data.frame_counter = fc_b; |
2495 | } | 2495 | } |
2496 | vino_drvdata->b.int_data.skip = skip_b; | 2496 | vino_drvdata->b.int_data.skip = skip_b; |
diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c index 0d59b9db83cb..c2f424f32450 100644 --- a/drivers/media/platform/vivi.c +++ b/drivers/media/platform/vivi.c | |||
@@ -554,7 +554,6 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf) | |||
554 | { | 554 | { |
555 | int wmax = dev->width; | 555 | int wmax = dev->width; |
556 | int hmax = dev->height; | 556 | int hmax = dev->height; |
557 | struct timeval ts; | ||
558 | void *vbuf = vb2_plane_vaddr(&buf->vb, 0); | 557 | void *vbuf = vb2_plane_vaddr(&buf->vb, 0); |
559 | unsigned ms; | 558 | unsigned ms; |
560 | char str[100]; | 559 | char str[100]; |
@@ -622,8 +621,7 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf) | |||
622 | buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; | 621 | buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; |
623 | dev->field_count++; | 622 | dev->field_count++; |
624 | buf->vb.v4l2_buf.sequence = dev->field_count >> 1; | 623 | buf->vb.v4l2_buf.sequence = dev->field_count >> 1; |
625 | do_gettimeofday(&ts); | 624 | v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); |
626 | buf->vb.v4l2_buf.timestamp = ts; | ||
627 | } | 625 | } |
628 | 626 | ||
629 | static void vivi_thread_tick(struct vivi_dev *dev) | 627 | static void vivi_thread_tick(struct vivi_dev *dev) |
@@ -645,7 +643,7 @@ static void vivi_thread_tick(struct vivi_dev *dev) | |||
645 | list_del(&buf->list); | 643 | list_del(&buf->list); |
646 | spin_unlock_irqrestore(&dev->slock, flags); | 644 | spin_unlock_irqrestore(&dev->slock, flags); |
647 | 645 | ||
648 | do_gettimeofday(&buf->vb.v4l2_buf.timestamp); | 646 | v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); |
649 | 647 | ||
650 | /* Fill buffer */ | 648 | /* Fill buffer */ |
651 | vivi_fillbuff(dev, buf); | 649 | vivi_fillbuff(dev, buf); |
diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0828/au0828-video.c index 45387aab10c7..8b9e8268e911 100644 --- a/drivers/media/usb/au0828/au0828-video.c +++ b/drivers/media/usb/au0828/au0828-video.c | |||
@@ -304,7 +304,7 @@ static inline void buffer_filled(struct au0828_dev *dev, | |||
304 | 304 | ||
305 | buf->vb.state = VIDEOBUF_DONE; | 305 | buf->vb.state = VIDEOBUF_DONE; |
306 | buf->vb.field_count++; | 306 | buf->vb.field_count++; |
307 | do_gettimeofday(&buf->vb.ts); | 307 | v4l2_get_timestamp(&buf->vb.ts); |
308 | 308 | ||
309 | dev->isoc_ctl.buf = NULL; | 309 | dev->isoc_ctl.buf = NULL; |
310 | 310 | ||
@@ -321,7 +321,7 @@ static inline void vbi_buffer_filled(struct au0828_dev *dev, | |||
321 | 321 | ||
322 | buf->vb.state = VIDEOBUF_DONE; | 322 | buf->vb.state = VIDEOBUF_DONE; |
323 | buf->vb.field_count++; | 323 | buf->vb.field_count++; |
324 | do_gettimeofday(&buf->vb.ts); | 324 | v4l2_get_timestamp(&buf->vb.ts); |
325 | 325 | ||
326 | dev->isoc_ctl.vbi_buf = NULL; | 326 | dev->isoc_ctl.vbi_buf = NULL; |
327 | 327 | ||
diff --git a/drivers/media/usb/cpia2/cpia2_usb.c b/drivers/media/usb/cpia2/cpia2_usb.c index 95b5d6e7cdc4..be1719283609 100644 --- a/drivers/media/usb/cpia2/cpia2_usb.c +++ b/drivers/media/usb/cpia2/cpia2_usb.c | |||
@@ -328,7 +328,7 @@ static void cpia2_usb_complete(struct urb *urb) | |||
328 | continue; | 328 | continue; |
329 | } | 329 | } |
330 | DBG("Start of frame pattern found\n"); | 330 | DBG("Start of frame pattern found\n"); |
331 | do_gettimeofday(&cam->workbuff->timestamp); | 331 | v4l2_get_timestamp(&cam->workbuff->timestamp); |
332 | cam->workbuff->seq = cam->frame_count++; | 332 | cam->workbuff->seq = cam->frame_count++; |
333 | cam->workbuff->data[0] = 0xFF; | 333 | cam->workbuff->data[0] = 0xFF; |
334 | cam->workbuff->data[1] = 0xD8; | 334 | cam->workbuff->data[1] = 0xD8; |
diff --git a/drivers/media/usb/cx231xx/cx231xx-417.c b/drivers/media/usb/cx231xx/cx231xx-417.c index b024e5197a75..28688dbcb609 100644 --- a/drivers/media/usb/cx231xx/cx231xx-417.c +++ b/drivers/media/usb/cx231xx/cx231xx-417.c | |||
@@ -1291,7 +1291,7 @@ static void buffer_copy(struct cx231xx *dev, char *data, int len, struct urb *ur | |||
1291 | 1291 | ||
1292 | buf->vb.state = VIDEOBUF_DONE; | 1292 | buf->vb.state = VIDEOBUF_DONE; |
1293 | buf->vb.field_count++; | 1293 | buf->vb.field_count++; |
1294 | do_gettimeofday(&buf->vb.ts); | 1294 | v4l2_get_timestamp(&buf->vb.ts); |
1295 | list_del(&buf->vb.queue); | 1295 | list_del(&buf->vb.queue); |
1296 | wake_up(&buf->vb.done); | 1296 | wake_up(&buf->vb.done); |
1297 | dma_q->mpeg_buffer_completed = 0; | 1297 | dma_q->mpeg_buffer_completed = 0; |
@@ -1327,7 +1327,7 @@ static void buffer_filled(char *data, int len, struct urb *urb, | |||
1327 | memcpy(vbuf, data, len); | 1327 | memcpy(vbuf, data, len); |
1328 | buf->vb.state = VIDEOBUF_DONE; | 1328 | buf->vb.state = VIDEOBUF_DONE; |
1329 | buf->vb.field_count++; | 1329 | buf->vb.field_count++; |
1330 | do_gettimeofday(&buf->vb.ts); | 1330 | v4l2_get_timestamp(&buf->vb.ts); |
1331 | list_del(&buf->vb.queue); | 1331 | list_del(&buf->vb.queue); |
1332 | wake_up(&buf->vb.done); | 1332 | wake_up(&buf->vb.done); |
1333 | 1333 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-vbi.c b/drivers/media/usb/cx231xx/cx231xx-vbi.c index ac7db52f404f..46e3892557c2 100644 --- a/drivers/media/usb/cx231xx/cx231xx-vbi.c +++ b/drivers/media/usb/cx231xx/cx231xx-vbi.c | |||
@@ -530,7 +530,7 @@ static inline void vbi_buffer_filled(struct cx231xx *dev, | |||
530 | 530 | ||
531 | buf->vb.state = VIDEOBUF_DONE; | 531 | buf->vb.state = VIDEOBUF_DONE; |
532 | buf->vb.field_count++; | 532 | buf->vb.field_count++; |
533 | do_gettimeofday(&buf->vb.ts); | 533 | v4l2_get_timestamp(&buf->vb.ts); |
534 | 534 | ||
535 | dev->vbi_mode.bulk_ctl.buf = NULL; | 535 | dev->vbi_mode.bulk_ctl.buf = NULL; |
536 | 536 | ||
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c index fedf7852a355..239cb913be5c 100644 --- a/drivers/media/usb/cx231xx/cx231xx-video.c +++ b/drivers/media/usb/cx231xx/cx231xx-video.c | |||
@@ -235,7 +235,7 @@ static inline void buffer_filled(struct cx231xx *dev, | |||
235 | cx231xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); | 235 | cx231xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); |
236 | buf->vb.state = VIDEOBUF_DONE; | 236 | buf->vb.state = VIDEOBUF_DONE; |
237 | buf->vb.field_count++; | 237 | buf->vb.field_count++; |
238 | do_gettimeofday(&buf->vb.ts); | 238 | v4l2_get_timestamp(&buf->vb.ts); |
239 | 239 | ||
240 | if (dev->USE_ISO) | 240 | if (dev->USE_ISO) |
241 | dev->video_mode.isoc_ctl.buf = NULL; | 241 | dev->video_mode.isoc_ctl.buf = NULL; |
diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 1e553d357380..766ad125fc08 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c | |||
@@ -163,7 +163,7 @@ static inline void buffer_filled(struct em28xx *dev, | |||
163 | em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); | 163 | em28xx_isocdbg("[%p/%d] wakeup\n", buf, buf->vb.i); |
164 | buf->vb.state = VIDEOBUF_DONE; | 164 | buf->vb.state = VIDEOBUF_DONE; |
165 | buf->vb.field_count++; | 165 | buf->vb.field_count++; |
166 | do_gettimeofday(&buf->vb.ts); | 166 | v4l2_get_timestamp(&buf->vb.ts); |
167 | 167 | ||
168 | dev->isoc_ctl.vid_buf = NULL; | 168 | dev->isoc_ctl.vid_buf = NULL; |
169 | 169 | ||
@@ -180,7 +180,7 @@ static inline void vbi_buffer_filled(struct em28xx *dev, | |||
180 | 180 | ||
181 | buf->vb.state = VIDEOBUF_DONE; | 181 | buf->vb.state = VIDEOBUF_DONE; |
182 | buf->vb.field_count++; | 182 | buf->vb.field_count++; |
183 | do_gettimeofday(&buf->vb.ts); | 183 | v4l2_get_timestamp(&buf->vb.ts); |
184 | 184 | ||
185 | dev->isoc_ctl.vbi_buf = NULL; | 185 | dev->isoc_ctl.vbi_buf = NULL; |
186 | 186 | ||
diff --git a/drivers/media/usb/pwc/pwc-if.c b/drivers/media/usb/pwc/pwc-if.c index 5210239cbaee..21c15233c6ae 100644 --- a/drivers/media/usb/pwc/pwc-if.c +++ b/drivers/media/usb/pwc/pwc-if.c | |||
@@ -316,7 +316,8 @@ static void pwc_isoc_handler(struct urb *urb) | |||
316 | struct pwc_frame_buf *fbuf = pdev->fill_buf; | 316 | struct pwc_frame_buf *fbuf = pdev->fill_buf; |
317 | 317 | ||
318 | if (pdev->vsync == 1) { | 318 | if (pdev->vsync == 1) { |
319 | do_gettimeofday(&fbuf->vb.v4l2_buf.timestamp); | 319 | v4l2_get_timestamp( |
320 | &fbuf->vb.v4l2_buf.timestamp); | ||
320 | pdev->vsync = 2; | 321 | pdev->vsync = 2; |
321 | } | 322 | } |
322 | 323 | ||
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 8ebec0d7bf59..498c57ea5d32 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c | |||
@@ -593,7 +593,7 @@ static int s2255_got_frame(struct s2255_channel *channel, int jpgsize) | |||
593 | buf = list_entry(dma_q->active.next, | 593 | buf = list_entry(dma_q->active.next, |
594 | struct s2255_buffer, vb.queue); | 594 | struct s2255_buffer, vb.queue); |
595 | list_del(&buf->vb.queue); | 595 | list_del(&buf->vb.queue); |
596 | do_gettimeofday(&buf->vb.ts); | 596 | v4l2_get_timestamp(&buf->vb.ts); |
597 | s2255_fillbuff(channel, buf, jpgsize); | 597 | s2255_fillbuff(channel, buf, jpgsize); |
598 | wake_up(&buf->vb.done); | 598 | wake_up(&buf->vb.done); |
599 | dprintk(2, "%s: [buf/i] [%p/%d]\n", __func__, buf, buf->vb.i); | 599 | dprintk(2, "%s: [buf/i] [%p/%d]\n", __func__, buf, buf->vb.i); |
@@ -629,7 +629,6 @@ static void s2255_fillbuff(struct s2255_channel *channel, | |||
629 | struct s2255_buffer *buf, int jpgsize) | 629 | struct s2255_buffer *buf, int jpgsize) |
630 | { | 630 | { |
631 | int pos = 0; | 631 | int pos = 0; |
632 | struct timeval ts; | ||
633 | const char *tmpbuf; | 632 | const char *tmpbuf; |
634 | char *vbuf = videobuf_to_vmalloc(&buf->vb); | 633 | char *vbuf = videobuf_to_vmalloc(&buf->vb); |
635 | unsigned long last_frame; | 634 | unsigned long last_frame; |
@@ -674,8 +673,7 @@ static void s2255_fillbuff(struct s2255_channel *channel, | |||
674 | /* tell v4l buffer was filled */ | 673 | /* tell v4l buffer was filled */ |
675 | 674 | ||
676 | buf->vb.field_count = channel->frame_count * 2; | 675 | buf->vb.field_count = channel->frame_count * 2; |
677 | do_gettimeofday(&ts); | 676 | v4l2_get_timestamp(&buf->vb.ts); |
678 | buf->vb.ts = ts; | ||
679 | buf->vb.state = VIDEOBUF_DONE; | 677 | buf->vb.state = VIDEOBUF_DONE; |
680 | } | 678 | } |
681 | 679 | ||
diff --git a/drivers/media/usb/sn9c102/sn9c102_core.c b/drivers/media/usb/sn9c102/sn9c102_core.c index 73605864fffa..8dbf0c721c4a 100644 --- a/drivers/media/usb/sn9c102/sn9c102_core.c +++ b/drivers/media/usb/sn9c102/sn9c102_core.c | |||
@@ -773,7 +773,8 @@ end_of_frame: | |||
773 | img); | 773 | img); |
774 | 774 | ||
775 | if ((*f)->buf.bytesused == 0) | 775 | if ((*f)->buf.bytesused == 0) |
776 | do_gettimeofday(&(*f)->buf.timestamp); | 776 | v4l2_get_timestamp( |
777 | &(*f)->buf.timestamp); | ||
777 | 778 | ||
778 | (*f)->buf.bytesused += img; | 779 | (*f)->buf.bytesused += img; |
779 | 780 | ||
diff --git a/drivers/media/usb/stk1160/stk1160-video.c b/drivers/media/usb/stk1160/stk1160-video.c index fa3671de02aa..0a4ee85f4399 100644 --- a/drivers/media/usb/stk1160/stk1160-video.c +++ b/drivers/media/usb/stk1160/stk1160-video.c | |||
@@ -101,7 +101,7 @@ void stk1160_buffer_done(struct stk1160 *dev) | |||
101 | buf->vb.v4l2_buf.sequence = dev->field_count >> 1; | 101 | buf->vb.v4l2_buf.sequence = dev->field_count >> 1; |
102 | buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; | 102 | buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED; |
103 | buf->vb.v4l2_buf.bytesused = buf->bytesused; | 103 | buf->vb.v4l2_buf.bytesused = buf->bytesused; |
104 | do_gettimeofday(&buf->vb.v4l2_buf.timestamp); | 104 | v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp); |
105 | 105 | ||
106 | vb2_set_plane_payload(&buf->vb, 0, buf->bytesused); | 106 | vb2_set_plane_payload(&buf->vb, 0, buf->bytesused); |
107 | vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE); | 107 | vb2_buffer_done(&buf->vb, VB2_BUF_STATE_DONE); |
diff --git a/drivers/media/usb/stkwebcam/stk-webcam.c b/drivers/media/usb/stkwebcam/stk-webcam.c index 5d3c032d733c..bf56904decb4 100644 --- a/drivers/media/usb/stkwebcam/stk-webcam.c +++ b/drivers/media/usb/stkwebcam/stk-webcam.c | |||
@@ -1113,7 +1113,7 @@ static int stk_vidioc_dqbuf(struct file *filp, | |||
1113 | sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED; | 1113 | sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_QUEUED; |
1114 | sbuf->v4lbuf.flags |= V4L2_BUF_FLAG_DONE; | 1114 | sbuf->v4lbuf.flags |= V4L2_BUF_FLAG_DONE; |
1115 | sbuf->v4lbuf.sequence = ++dev->sequence; | 1115 | sbuf->v4lbuf.sequence = ++dev->sequence; |
1116 | do_gettimeofday(&sbuf->v4lbuf.timestamp); | 1116 | v4l2_get_timestamp(&sbuf->v4lbuf.timestamp); |
1117 | 1117 | ||
1118 | *buf = sbuf->v4lbuf; | 1118 | *buf = sbuf->v4lbuf; |
1119 | return 0; | 1119 | return 0; |
diff --git a/drivers/media/usb/tlg2300/pd-video.c b/drivers/media/usb/tlg2300/pd-video.c index 3082bfa9b2c5..21723378bb8f 100644 --- a/drivers/media/usb/tlg2300/pd-video.c +++ b/drivers/media/usb/tlg2300/pd-video.c | |||
@@ -212,7 +212,7 @@ static void submit_frame(struct front_face *front) | |||
212 | front->curr_frame = NULL; | 212 | front->curr_frame = NULL; |
213 | vb->state = VIDEOBUF_DONE; | 213 | vb->state = VIDEOBUF_DONE; |
214 | vb->field_count++; | 214 | vb->field_count++; |
215 | do_gettimeofday(&vb->ts); | 215 | v4l2_get_timestamp(&vb->ts); |
216 | 216 | ||
217 | wake_up(&vb->done); | 217 | wake_up(&vb->done); |
218 | } | 218 | } |
diff --git a/drivers/media/usb/tm6000/tm6000-video.c b/drivers/media/usb/tm6000/tm6000-video.c index 1edc2517603f..e3c567c27918 100644 --- a/drivers/media/usb/tm6000/tm6000-video.c +++ b/drivers/media/usb/tm6000/tm6000-video.c | |||
@@ -194,7 +194,7 @@ static inline void buffer_filled(struct tm6000_core *dev, | |||
194 | dprintk(dev, V4L2_DEBUG_ISOC, "[%p/%d] wakeup\n", buf, buf->vb.i); | 194 | dprintk(dev, V4L2_DEBUG_ISOC, "[%p/%d] wakeup\n", buf, buf->vb.i); |
195 | buf->vb.state = VIDEOBUF_DONE; | 195 | buf->vb.state = VIDEOBUF_DONE; |
196 | buf->vb.field_count++; | 196 | buf->vb.field_count++; |
197 | do_gettimeofday(&buf->vb.ts); | 197 | v4l2_get_timestamp(&buf->vb.ts); |
198 | 198 | ||
199 | list_del(&buf->vb.queue); | 199 | list_del(&buf->vb.queue); |
200 | wake_up(&buf->vb.done); | 200 | wake_up(&buf->vb.done); |
diff --git a/drivers/media/usb/usbvision/usbvision-core.c b/drivers/media/usb/usbvision/usbvision-core.c index c9b2042f8bdf..816b1cffab7d 100644 --- a/drivers/media/usb/usbvision/usbvision-core.c +++ b/drivers/media/usb/usbvision/usbvision-core.c | |||
@@ -1169,7 +1169,7 @@ static void usbvision_parse_data(struct usb_usbvision *usbvision) | |||
1169 | 1169 | ||
1170 | if (newstate == parse_state_next_frame) { | 1170 | if (newstate == parse_state_next_frame) { |
1171 | frame->grabstate = frame_state_done; | 1171 | frame->grabstate = frame_state_done; |
1172 | do_gettimeofday(&(frame->timestamp)); | 1172 | v4l2_get_timestamp(&(frame->timestamp)); |
1173 | frame->sequence = usbvision->frame_num; | 1173 | frame->sequence = usbvision->frame_num; |
1174 | 1174 | ||
1175 | spin_lock_irqsave(&usbvision->queue_lock, lock_flags); | 1175 | spin_lock_irqsave(&usbvision->queue_lock, lock_flags); |
diff --git a/drivers/media/usb/zr364xx/zr364xx.c b/drivers/media/usb/zr364xx/zr364xx.c index 39edd4442932..74d56df3347f 100644 --- a/drivers/media/usb/zr364xx/zr364xx.c +++ b/drivers/media/usb/zr364xx/zr364xx.c | |||
@@ -501,7 +501,6 @@ static void zr364xx_fillbuff(struct zr364xx_camera *cam, | |||
501 | int jpgsize) | 501 | int jpgsize) |
502 | { | 502 | { |
503 | int pos = 0; | 503 | int pos = 0; |
504 | struct timeval ts; | ||
505 | const char *tmpbuf; | 504 | const char *tmpbuf; |
506 | char *vbuf = videobuf_to_vmalloc(&buf->vb); | 505 | char *vbuf = videobuf_to_vmalloc(&buf->vb); |
507 | unsigned long last_frame; | 506 | unsigned long last_frame; |
@@ -530,8 +529,7 @@ static void zr364xx_fillbuff(struct zr364xx_camera *cam, | |||
530 | /* tell v4l buffer was filled */ | 529 | /* tell v4l buffer was filled */ |
531 | 530 | ||
532 | buf->vb.field_count = cam->frame_count * 2; | 531 | buf->vb.field_count = cam->frame_count * 2; |
533 | do_gettimeofday(&ts); | 532 | v4l2_get_timestamp(&buf->vb.ts); |
534 | buf->vb.ts = ts; | ||
535 | buf->vb.state = VIDEOBUF_DONE; | 533 | buf->vb.state = VIDEOBUF_DONE; |
536 | } | 534 | } |
537 | 535 | ||
@@ -559,7 +557,7 @@ static int zr364xx_got_frame(struct zr364xx_camera *cam, int jpgsize) | |||
559 | goto unlock; | 557 | goto unlock; |
560 | } | 558 | } |
561 | list_del(&buf->vb.queue); | 559 | list_del(&buf->vb.queue); |
562 | do_gettimeofday(&buf->vb.ts); | 560 | v4l2_get_timestamp(&buf->vb.ts); |
563 | DBG("[%p/%d] wakeup\n", buf, buf->vb.i); | 561 | DBG("[%p/%d] wakeup\n", buf, buf->vb.i); |
564 | zr364xx_fillbuff(cam, buf, jpgsize); | 562 | zr364xx_fillbuff(cam, buf, jpgsize); |
565 | wake_up(&buf->vb.done); | 563 | wake_up(&buf->vb.done); |