diff options
author | Hans Verkuil <hverkuil@xs4all.nl> | 2019-06-26 11:58:02 +0200 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab+samsung@kernel.org> | 2019-07-23 14:48:33 +0200 |
commit | b61789f53d49db8ca1f6b8fed411b317b4e8f044 (patch) | |
tree | 8491fcb0a20b6365c46e5ba46873a231c095051f /drivers/media/usb/s2255/s2255drv.c | |
parent | media: v4l2-mem2mem: reorder checks in v4l2_m2m_poll() (diff) | |
download | linux-b61789f53d49db8ca1f6b8fed411b317b4e8f044.tar.xz linux-b61789f53d49db8ca1f6b8fed411b317b4e8f044.zip |
media: drivers/media: don't set pix->priv = 0
The priv field of struct v4l2_pix_format shouldn't be set by drivers,
it's set by the v4l2 core instead to V4L2_PIX_FMT_PRIV_MAGIC.
Drop this from the few media drivers that still do this.
Note that the gspca patch is slightly more involved since some of the
sub-gspca drivers use the priv field internally.
Signed-off-by: Hans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
[hverkuil-cisco@xs4all.nl: fix clash in gspca between priv arg and priv variable]
Signed-off-by: Mauro Carvalho Chehab <mchehab+samsung@kernel.org>
Diffstat (limited to 'drivers/media/usb/s2255/s2255drv.c')
-rw-r--r-- | drivers/media/usb/s2255/s2255drv.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/drivers/media/usb/s2255/s2255drv.c b/drivers/media/usb/s2255/s2255drv.c index 533f7f064a44..329ec8089592 100644 --- a/drivers/media/usb/s2255/s2255drv.c +++ b/drivers/media/usb/s2255/s2255drv.c @@ -751,7 +751,6 @@ static int vidioc_g_fmt_vid_cap(struct file *file, void *priv, f->fmt.pix.bytesperline = f->fmt.pix.width * (vc->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; } @@ -803,7 +802,6 @@ static int vidioc_try_fmt_vid_cap(struct file *file, void *priv, 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(vc->dev, 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; |