diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2020-12-07 00:53:48 +0100 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+huawei@kernel.org> | 2021-01-04 12:09:34 +0100 |
commit | 9ae6b925848eed49f08451c6ee90d9a21ce0a3c9 (patch) | |
tree | 21fd305d0772457a5e86d2d3ddee476567623f15 /drivers/media/platform/ti-vpe | |
parent | d7d24d772f2c56e32ce8beb1a05a04fe28e4d888 (diff) |
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: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
Diffstat (limited to 'drivers/media/platform/ti-vpe')
-rw-r--r-- | drivers/media/platform/ti-vpe/cal-video.c | 2 | ||||
-rw-r--r-- | drivers/media/platform/ti-vpe/cal.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/drivers/media/platform/ti-vpe/cal-video.c b/drivers/media/platform/ti-vpe/cal-video.c index bfc3ba4a96af..c80c4643d8ed 100644 --- a/drivers/media/platform/ti-vpe/cal-video.c +++ b/drivers/media/platform/ti-vpe/cal-video.c @@ -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); diff --git a/drivers/media/platform/ti-vpe/cal.c b/drivers/media/platform/ti-vpe/cal.c index f1c2b8bc28f4..8f25e7a6f5e8 100644 --- a/drivers/media/platform/ti-vpe/cal.c +++ b/drivers/media/platform/ti-vpe/cal.c @@ -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); |