summaryrefslogtreecommitdiffstats
path: root/drivers/media/usb/cx231xx
diff options
context:
space:
mode:
authorHans Verkuil2013-02-09 10:35:02 +0100
committerMauro Carvalho Chehab2013-03-05 18:25:58 +0100
commit8b735c130717cb0af7793e30bbb6e91709ef10f8 (patch)
treeb4e2d3354c8d745f3036142ee85af237481cbb99 /drivers/media/usb/cx231xx
parent[media] cx231xx: fix tuner compliance issues (diff)
downloadkernel-qcow2-linux-8b735c130717cb0af7793e30bbb6e91709ef10f8.tar.gz
kernel-qcow2-linux-8b735c130717cb0af7793e30bbb6e91709ef10f8.tar.xz
kernel-qcow2-linux-8b735c130717cb0af7793e30bbb6e91709ef10f8.zip
[media] cx231xx: zero priv field and use right width in try_fmt
The priv field of v4l2_pix_format must be zeroed. Also fix a bug in try_fmt where the current width was used instead of the width passed to try_fmt. Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/usb/cx231xx')
-rw-r--r--drivers/media/usb/cx231xx/cx231xx-video.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/usb/cx231xx/cx231xx-video.c b/drivers/media/usb/cx231xx/cx231xx-video.c
index 2b7b0944b7b4..9593fd3cdc85 100644
--- a/drivers/media/usb/cx231xx/cx231xx-video.c
+++ b/drivers/media/usb/cx231xx/cx231xx-video.c
@@ -1005,6 +1005,7 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
f->fmt.pix.field = V4L2_FIELD_INTERLACED;
+ f->fmt.pix.priv = 0;
return 0;
}
@@ -1045,10 +1046,11 @@ 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;
f->fmt.pix.field = V4L2_FIELD_INTERLACED;
+ f->fmt.pix.priv = 0;
return 0;
}