diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2013-05-10 07:06:50 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2013-05-27 08:30:19 -0400 |
commit | 6266a9d9b0e9824562c3c5604dd812d3befc72f1 (patch) | |
tree | 12664875ebbf2489595f9b7d0a55f263981d1809 /drivers/media | |
parent | 19ec93057439cffc3b89910cd356892fbe2172fa (diff) |
[media] bw-qcam: fix timestamp handling
bw-qcam didn't set the timestamp and it didn't set q->timestamp_type.
Tested-by: Borislav Petkov <bp@suse.de>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r-- | drivers/media/parport/bw-qcam.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/media/parport/bw-qcam.c b/drivers/media/parport/bw-qcam.c index 06231b85e1a9..d12bd33f39cb 100644 --- a/drivers/media/parport/bw-qcam.c +++ b/drivers/media/parport/bw-qcam.c | |||
@@ -687,6 +687,7 @@ static int buffer_finish(struct vb2_buffer *vb) | |||
687 | 687 | ||
688 | parport_release(qcam->pdev); | 688 | parport_release(qcam->pdev); |
689 | mutex_unlock(&qcam->lock); | 689 | mutex_unlock(&qcam->lock); |
690 | v4l2_get_timestamp(&vb->v4l2_buf.timestamp); | ||
690 | if (len != size) | 691 | if (len != size) |
691 | vb->state = VB2_BUF_STATE_ERROR; | 692 | vb->state = VB2_BUF_STATE_ERROR; |
692 | vb2_set_plane_payload(vb, 0, len); | 693 | vb2_set_plane_payload(vb, 0, len); |
@@ -964,6 +965,7 @@ static struct qcam *qcam_init(struct parport *port) | |||
964 | q->drv_priv = qcam; | 965 | q->drv_priv = qcam; |
965 | q->ops = &qcam_video_qops; | 966 | q->ops = &qcam_video_qops; |
966 | q->mem_ops = &vb2_vmalloc_memops; | 967 | q->mem_ops = &vb2_vmalloc_memops; |
968 | q->timestamp_type = V4L2_BUF_FLAG_TIMESTAMP_MONOTONIC; | ||
967 | err = vb2_queue_init(q); | 969 | err = vb2_queue_init(q); |
968 | if (err < 0) { | 970 | if (err < 0) { |
969 | v4l2_err(v4l2_dev, "couldn't init vb2_queue for %s.\n", port->name); | 971 | v4l2_err(v4l2_dev, "couldn't init vb2_queue for %s.\n", port->name); |