summaryrefslogtreecommitdiff
path: root/linux/drivers/media/video/uvc/uvc_v4l2.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@redhat.com>2009-03-29 22:46:14 -0300
committerMauro Carvalho Chehab <mchehab@redhat.com>2009-03-29 22:46:14 -0300
commitd61139b02ffe6aefe7dfd1da54dcaa7a047e69e0 (patch)
treec332ef94a628fdf65fb8921c65015924419c199e /linux/drivers/media/video/uvc/uvc_v4l2.c
parent10aa65f2b471272aa17c042bfdd290dbf695a848 (diff)
parentd4144041518b63e88d1635667f742b292ef03a70 (diff)
downloadmediapointer-dvb-s2-d61139b02ffe6aefe7dfd1da54dcaa7a047e69e0.tar.gz
mediapointer-dvb-s2-d61139b02ffe6aefe7dfd1da54dcaa7a047e69e0.tar.bz2
merge: http://linuxtv.org/hg/~pinchartl/uvcvideo/
From: Mauro Carvalho Chehab <mchehab@redhat.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'linux/drivers/media/video/uvc/uvc_v4l2.c')
-rw-r--r--linux/drivers/media/video/uvc/uvc_v4l2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/linux/drivers/media/video/uvc/uvc_v4l2.c b/linux/drivers/media/video/uvc/uvc_v4l2.c
index 0baa59f61..aa7949d95 100644
--- a/linux/drivers/media/video/uvc/uvc_v4l2.c
+++ b/linux/drivers/media/video/uvc/uvc_v4l2.c
@@ -679,11 +679,17 @@ static long uvc_v4l2_do_ioctl(struct file *file, unsigned int cmd, void *arg)
{
struct v4l2_fmtdesc *fmt = arg;
struct uvc_format *format;
+ enum v4l2_buf_type type = fmt->type;
+ __u32 index = fmt->index;
if (fmt->type != video->streaming->type ||
fmt->index >= video->streaming->nformats)
return -EINVAL;
+ memset(fmt, 0, sizeof(*fmt));
+ fmt->index = index;
+ fmt->type = type;
+
format = &video->streaming->format[fmt->index];
fmt->flags = 0;
if (format->flags & UVC_FMT_FLAG_COMPRESSED)