Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 29ceb110 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab
Browse files

[media] s2255: zero priv and set colorspace



Set priv field of struct v4l2_pix_format to 0 and fill in colorspace.

Signed-off-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent 469af77a
Loading
Loading
Loading
Loading
+4 −0
Original line number Original line Diff line number Diff line
@@ -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.pixelformat = channel->fmt->fourcc;
	f->fmt.pix.bytesperline = f->fmt.pix.width * (channel->fmt->depth >> 3);
	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.sizeimage = f->fmt.pix.height * f->fmt.pix.bytesperline;
	f->fmt.pix.colorspace = V4L2_COLORSPACE_SMPTE170M;
	f->fmt.pix.priv = 0;
	return 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.field = field;
	f->fmt.pix.bytesperline = (f->fmt.pix.width * fmt->depth) >> 3;
	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.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__,
	dprintk(50, "%s: set width %d height %d field %d\n", __func__,
		f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.field);
		f->fmt.pix.width, f->fmt.pix.height, f->fmt.pix.field);
	return 0;
	return 0;