summaryrefslogtreecommitdiffstats
path: root/drivers/media/platform/omap3isp/ispstat.c
diff options
context:
space:
mode:
authorArnd Bergmann <arnd@arndb.de>2015-09-17 18:19:37 -0300
committerMauro Carvalho Chehab <mchehab@osg.samsung.com>2015-10-01 08:29:23 -0300
commit5ba0e2c3ad4c049b19f6cad7ec62e59424a55183 (patch)
treeda731151900e30bac077a5ef1872b32a62d1a7e2 /drivers/media/platform/omap3isp/ispstat.c
parent2ef3b6fe9e6d7b22ca9f81a58d5ff089f7b4ef91 (diff)
downloadblackbird-op-linux-5ba0e2c3ad4c049b19f6cad7ec62e59424a55183.tar.gz
blackbird-op-linux-5ba0e2c3ad4c049b19f6cad7ec62e59424a55183.zip
[media] use v4l2_get_timestamp where possible
This is a preparation for a change to the type of v4l2 timestamps. v4l2_get_timestamp() is a helper function that reads the monotonic time and stores it into a 'struct timeval'. Multiple drivers implement the same thing themselves for historic reasons. Changing them all to use v4l2_get_timestamp() is more consistent and reduces the amount of code duplication, and most importantly simplifies the following changes. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sylwester Nawrocki <s.nawrocki@samsung.com> [hans.verkuil@cisco.com: dropped the v4l2-dev.c patch that didn't belong here] Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Diffstat (limited to 'drivers/media/platform/omap3isp/ispstat.c')
-rw-r--r--drivers/media/platform/omap3isp/ispstat.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/drivers/media/platform/omap3isp/ispstat.c b/drivers/media/platform/omap3isp/ispstat.c
index 20434e83e801..94d4c295d3d0 100644
--- a/drivers/media/platform/omap3isp/ispstat.c
+++ b/drivers/media/platform/omap3isp/ispstat.c
@@ -235,7 +235,7 @@ static int isp_stat_buf_queue(struct ispstat *stat)
if (!stat->active_buf)
return STAT_NO_BUF;
- ktime_get_ts(&stat->active_buf->ts);
+ v4l2_get_timestamp(&stat->active_buf->ts);
stat->active_buf->buf_size = stat->buf_size;
if (isp_stat_buf_check_magic(stat, stat->active_buf)) {
@@ -496,8 +496,7 @@ int omap3isp_stat_request_statistics(struct ispstat *stat,
return PTR_ERR(buf);
}
- data->ts.tv_sec = buf->ts.tv_sec;
- data->ts.tv_usec = buf->ts.tv_nsec / NSEC_PER_USEC;
+ data->ts = buf->ts;
data->config_counter = buf->config_counter;
data->frame_number = buf->frame_number;
data->buf_size = buf->buf_size;
OpenPOWER on IntegriCloud