Commit 2801f6f3 authored by Ezequiel Garcia's avatar Ezequiel Garcia Committed by Mauro Carvalho Chehab
Browse files

media: videobuf2: Remove vb2_find_timestamp()



Now that we've transitioned all users to vb2_find_buffer API,
remove the unused vb2_find_timestamp().

Signed-off-by: default avatarEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Acked-by: default avatarTomasz Figa <tfiga@chromium.org>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@kernel.org>
parent e21cde40
Loading
Loading
Loading
Loading
+0 −13
Original line number Diff line number Diff line
@@ -625,19 +625,6 @@ static const struct vb2_buf_ops v4l2_buf_ops = {
	.copy_timestamp		= __copy_timestamp,
};

int vb2_find_timestamp(const struct vb2_queue *q, u64 timestamp,
		       unsigned int start_idx)
{
	unsigned int i;

	for (i = start_idx; i < q->num_buffers; i++)
		if (q->bufs[i]->copied_timestamp &&
		    q->bufs[i]->timestamp == timestamp)
			return i;
	return -1;
}
EXPORT_SYMBOL_GPL(vb2_find_timestamp);

struct vb2_buffer *vb2_find_buffer(struct vb2_queue *q, u64 timestamp)
{
	unsigned int i;
+0 −16
Original line number Diff line number Diff line
@@ -62,22 +62,6 @@ struct vb2_v4l2_buffer {
#define to_vb2_v4l2_buffer(vb) \
	container_of(vb, struct vb2_v4l2_buffer, vb2_buf)

/**
 * vb2_find_timestamp() - Find buffer with given timestamp in the queue
 *
 * @q:		pointer to &struct vb2_queue with videobuf2 queue.
 * @timestamp:	the timestamp to find.
 * @start_idx:	the start index (usually 0) in the buffer array to start
 *		searching from. Note that there may be multiple buffers
 *		with the same timestamp value, so you can restart the search
 *		by setting @start_idx to the previously found index + 1.
 *
 * Returns the buffer index of the buffer with the given @timestamp, or
 * -1 if no buffer with @timestamp was found.
 */
int vb2_find_timestamp(const struct vb2_queue *q, u64 timestamp,
		       unsigned int start_idx);

/**
 * vb2_find_buffer() - Find a buffer with given timestamp
 *