]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
[media] s2255: zero priv and set colorspace
authorHans Verkuil <hans.verkuil@cisco.com>
Fri, 15 Feb 2013 09:03:26 +0000 (06:03 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Tue, 5 Mar 2013 18:37:37 +0000 (15:37 -0300)
Set priv field of struct v4l2_pix_format to 0 and fill in colorspace.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/usb/s2255/s2255drv.c

index 88f728d3b24f0095744e806f500a00fe51d176b4..a16bc6cdd0077233d6141425574dffcc61aadac6 100644 (file)
@@ -859,6 +859,8 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv,
        f->fmt.pix.pixelformat = channel->fmt->fourcc;
        f->fmt.pix.bytesperline = f->fmt.pix.width * (channel->fmt->depth >> 3);
        f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+       f->fmt.pix.priv = 0;
        return 0;
 }
 
@@ -954,6 +956,8 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv,
        f->fmt.pix.field = field;
        f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3;
        f->fmt.pix.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
+       f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
+       f->fmt.pix.priv = 0;
        dprintk(50, "%s: set width %d height %d field %d\n", __func__,
                f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.field);
        return 0;