From: Luc Saillard Date: Mon, 23 Apr 2007 02:55:10 +0000 (-0300) Subject: V4L/DVB (5548): Fix v4l2 buffer to the length X-Git-Tag: v2.6.22-rc1~1118^2~13 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=288bb0e79015d4121d4ccf77a4db2bde27a49492;p=linux-2.6 V4L/DVB (5548): Fix v4l2 buffer to the length Set the length of the v4l2 buffer to the length of the mapped memory. This should fix the problem with amsn. Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/video/pwc/pwc-v4l.c b/drivers/media/video/pwc/pwc-v4l.c index e20251d05b..32fbe1ae62 100644 --- a/drivers/media/video/pwc/pwc-v4l.c +++ b/drivers/media/video/pwc/pwc-v4l.c @@ -1168,7 +1168,7 @@ int pwc_video_do_ioctl(struct inode *inode, struct file *file, buf->sequence = 0; buf->memory = V4L2_MEMORY_MMAP; buf->m.offset = pdev->fill_image * pdev->len_per_image; - buf->length = buf->bytesused; + buf->length = pdev->len_per_image; pwc_next_image(pdev); PWC_DEBUG_IOCTL("VIDIOC_DQBUF: buf->index=%d\n",buf->index);