summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsensoray-dev <linux-dev@sensoray.com>2014-11-17 19:50:36 -0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-12-16 09:37:08 -0800
commitce7c82e8f8616f03120f8bed8e4f344b69fa6a47 (patch)
treec9e935bf24af39494929930305bad23832d67e77
parent26366e61455f21778408b57901e7778dc45cddde (diff)
media: s2255drv: fix payload size for JPG, MJPEG
commit 1f391217ad8d7cd7b1e48e6e2abf49970cd91d18 upstream. length is the size of the buffer, not the payload. That's set using vb2_set_plane_payload(). Signed-off-by: Dean Anderson <linux-dev@sensoray.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-rw-r--r--drivers/media/usb/s2255/s2255drv.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c
index 2c901861034a..efcaa90529ba 100644
--- a/drivers/media/usb/s2255/s2255drv.c
+++ b/drivers/media/usb/s2255/s2255drv.c
@@ -632,7 +632,7 @@ static void s2255_fillbuff(struct s2255_vc *vc,
break;
case V4L2_PIX_FMT_JPEG:
case V4L2_PIX_FMT_MJPEG:
- buf->vb.v4l2_buf.length = jpgsize;
+ vb2_set_plane_payload(&buf->vb, 0, jpgsize);
memcpy(vbuf, tmpbuf, jpgsize);
break;
case V4L2_PIX_FMT_YUV422P: