Commit 9ae6b925 authored by Laurent Pinchart's avatar Laurent Pinchart Committed by Mauro Carvalho Chehab
Browse files

media: ti-vpe: cal: Use list_first_entry()



Use the list_first_entry() macro where appropriate to replace manual
usage of list_entry(head.next).

Signed-off-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: default avatarBenoit Parrot <bparrot@ti.com>
Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent d7d24d77
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -511,7 +511,7 @@ static int cal_start_streaming(struct vb2_queue *vq, unsigned int count)
	int ret;

	spin_lock_irq(&ctx->slock);
	buf = list_entry(dma_q->active.next, struct cal_buffer, list);
	buf = list_first_entry(&dma_q->active, struct cal_buffer, list);
	ctx->cur_frm = buf;
	ctx->next_frm = buf;
	list_del(&buf->list);
+1 −1
Original line number Diff line number Diff line
@@ -496,7 +496,7 @@ static inline void cal_irq_wdma_start(struct cal_ctx *ctx)
		struct cal_buffer *buf;
		unsigned long addr;

		buf = list_entry(dma_q->active.next, struct cal_buffer, list);
		buf = list_first_entry(&dma_q->active, struct cal_buffer, list);
		addr = vb2_dma_contig_plane_dma_addr(&buf->vb.vb2_buf, 0);
		cal_ctx_wr_dma_addr(ctx, addr);