From: Hans Verkuil Date: Wed, 6 Feb 2013 11:14:47 +0000 (-0300) Subject: [media] [REVIEW] em28xx: fix bytesperline calculation in TRY_FMT X-Git-Tag: v3.9-rc5~2^2~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e6066dba444903344c843dbdcb77a4823c51e7e3;p=platform%2Fkernel%2Flinux-stable.git [media] [REVIEW] em28xx: fix bytesperline calculation in TRY_FMT The bytesperline calculation was incorrect: it used the old width instead of the provided width. Fixed. Signed-off-by: Hans Verkuil Acked-by: Frank Schäfer Signed-off-by: Mauro Carvalho Chehab --- diff --git a/drivers/media/usb/em28xx/em28xx-video.c b/drivers/media/usb/em28xx/em28xx-video.c index 2eabf2a..32bd7de 100644 --- a/drivers/media/usb/em28xx/em28xx-video.c +++ b/drivers/media/usb/em28xx/em28xx-video.c @@ -906,7 +906,7 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, f->fmt.pix.width = width; f->fmt.pix.height = height; f->fmt.pix.pixelformat = fmt->fourcc; - f->fmt.pix.bytesperline = (dev->width * fmt->depth + 7) >> 3; + f->fmt.pix.bytesperline = (width * fmt->depth + 7) >> 3; f->fmt.pix.sizeimage = f->fmt.pix.bytesperline * height; f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M; if (dev->progressive)