Commit 97215cbd authored by Magnus Damm's avatar Magnus Damm Committed by Mauro Carvalho Chehab

V4L/DVB (11029): video: use videobuf_waiton() in sh_mobile_ceu free_buffer()

Make sure videobuf_waiton() is used before freeing a buffer.
Without this fix we may return the buffer to the allocator
before the bus mastering operation is finished.
Reported-by: default avatarMatthieu CASTET <matthieu.castet@parrot.com>
Tested-by: default avatarKuninori Morimoto <morimoto.kuninori@renesas.com>
Signed-off-by: default avatarMagnus Damm <damm@igel.co.jp>
Signed-off-by: default avatarGuennadi Liakhovetski <g.liakhovetski@gmx.de>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent f340e3f6
...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq, ...@@ -174,6 +174,7 @@ static void free_buffer(struct videobuf_queue *vq,
if (in_interrupt()) if (in_interrupt())
BUG(); BUG();
videobuf_waiton(&buf->vb, 0, 0);
videobuf_dma_contig_free(vq, &buf->vb); videobuf_dma_contig_free(vq, &buf->vb);
dev_dbg(&icd->dev, "%s freed\n", __func__); dev_dbg(&icd->dev, "%s freed\n", __func__);
buf->vb.state = VIDEOBUF_NEEDS_INIT; buf->vb.state = VIDEOBUF_NEEDS_INIT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment