Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 209113f9 authored by Trishansh Bhardwaj's avatar Trishansh Bhardwaj
Browse files

msm: camera: Use u64 to hold timestamp value



On 32-bit tv_sec is 4 bytes long and overflows in timestamp
computation.

Change-Id: I24387b5d8921e5f9cd0261beb7b179575f0b8a9d
Signed-off-by: default avatarTrishansh Bhardwaj <tbhardwa@codeaurora.org>
parent ccf21f85
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -443,7 +443,8 @@ static int msm_vb2_buf_done(struct vb2_v4l2_buffer *vb, int session_id,
			vb2_v4l2_buf->sequence = sequence;
			vb2_v4l2_buf->timecode.type = buf_type;
			vb2_v4l2_buf->vb2_buf.timestamp =
				(ts->tv_sec * 1000000 + ts->tv_usec) * 1000;
				((u64)ts->tv_sec * 1000000 +
				ts->tv_usec) * 1000;
			vb2_buffer_done(&vb2_v4l2_buf->vb2_buf,
				VB2_BUF_STATE_DONE);
			msm_vb2->in_freeq = 0;