summaryrefslogtreecommitdiff
path: root/drivers/media/platform/vivi.c
diff options
context:
space:
mode:
authorSakari Ailus <sakari.ailus@iki.fi>2012-09-15 22:14:42 +0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2012-12-21 16:56:43 +0400
commit8e6057b510aad354e017c6dfca7f386a0eb91b63 (patch)
treeac76cc2593f255325972f05bde025954f2d3b41c /drivers/media/platform/vivi.c
parentabd23295648a9e3ae72a806e70a510d3dcd8b374 (diff)
downloadlinux-8e6057b510aad354e017c6dfca7f386a0eb91b63.tar.xz
[media] v4l: Convert drivers to use monotonic timestamps
Convert drivers using wall clock time (CLOCK_REALTIME) to timestamp from the monotonic timer (CLOCK_MONOTONIC). Signed-off-by: Sakari Ailus <sakari.ailus@iki.fi> Acked-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/platform/vivi.c')
-rw-r--r--drivers/media/platform/vivi.c6
1 files changed, 2 insertions, 4 deletions
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)
{
int wmax = dev->width;
int hmax = dev->height;
- struct timeval ts;
void *vbuf = vb2_plane_vaddr(&buf->vb, 0);
unsigned ms;
char str[100];
@@ -622,8 +621,7 @@ static void vivi_fillbuff(struct vivi_dev *dev, struct vivi_buffer *buf)
buf->vb.v4l2_buf.field = V4L2_FIELD_INTERLACED;
dev->field_count++;
buf->vb.v4l2_buf.sequence = dev->field_count >> 1;
- do_gettimeofday(&ts);
- buf->vb.v4l2_buf.timestamp = ts;
+ v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
}
static void vivi_thread_tick(struct vivi_dev *dev)
@@ -645,7 +643,7 @@ static void vivi_thread_tick(struct vivi_dev *dev)
list_del(&buf->list);
spin_unlock_irqrestore(&dev->slock, flags);
- do_gettimeofday(&buf->vb.v4l2_buf.timestamp);
+ v4l2_get_timestamp(&buf->vb.v4l2_buf.timestamp);
/* Fill buffer */
vivi_fillbuff(dev, buf);