summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video
diff options
context:
space:
mode:
authorGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-03-13 10:08:20 +0100
committerGuennadi Liakhovetski <g.liakhovetski@gmx.de>2009-03-13 10:08:20 +0100
commit9fd188a1ab044c7613e040e38da6a990e3a5a416 (patch)
treed59def1f9d1f9d944325bb5af59782e27b9e0b73 /linux/drivers/media/video
parent823ea474f6ef741eb378f550d4c7b2aaf233b23f (diff)
downloadmediapointer-dvb-s2-9fd188a1ab044c7613e040e38da6a990e3a5a416.tar.gz
mediapointer-dvb-s2-9fd188a1ab044c7613e040e38da6a990e3a5a416.tar.bz2
video: use videobuf_waiton() in sh_mobile_ceu free_buffer()
From: Magnus Damm <damm@igel.co.jp> 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: Matthieu CASTET <matthieu.castet@parrot.com> Tested-by: Kuninori Morimoto <morimoto.kuninori@renesas.com> Signed-off-by: Magnus Damm <damm@igel.co.jp> Signed-off-by: Guennadi Liakhovetski <g.liakhovetski@gmx.de> --- drivers/media/video/sh_mobile_ceu_camera.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-)
Diffstat (limited to 'linux/drivers/media/video')
-rw-r--r--linux/drivers/media/video/sh_mobile_ceu_camera.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/linux/drivers/media/video/sh_mobile_ceu_camera.c b/linux/drivers/media/video/sh_mobile_ceu_camera.c
index 1a4026a95..cd796b33f 100644
--- a/linux/drivers/media/video/sh_mobile_ceu_camera.c
+++ b/linux/drivers/media/video/sh_mobile_ceu_camera.c
@@ -175,6 +175,7 @@ static void free_buffer(struct videobuf_queue *vq,
if (in_interrupt())
BUG();
+ videobuf_waiton(&buf->vb, 0, 0);
videobuf_dma_contig_free(vq, &buf->vb);
dev_dbg(&icd->dev, "%s freed\n", __func__);
buf->vb.state = VIDEOBUF_NEEDS_INIT;