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

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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Reviewed-by: default avatarLaurent Pinchart <laurent.pinchart@ideasonboard.com>
[hverkuil-cisco@xs4all.nl: fix clash in gspca between priv arg and priv variable]
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+samsung@kernel.org>
parent 7708065f
Loading
Loading
Loading
Loading
+0 −1
Original line number Diff line number Diff line
@@ -785,7 +785,6 @@ static int cobalt_try_fmt_vid_cap(struct file *file, void *priv_fh,

	pix->sizeimage = pix->bytesperline * pix->height;
	pix->field = V4L2_FIELD_NONE;
	pix->priv = 0;

	return 0;
}
+0 −2
Original line number Diff line number Diff line
@@ -879,7 +879,6 @@ static int solo_enc_try_fmt_cap(struct file *file, void *priv,
	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
	pix->sizeimage = FRAME_BUF_SIZE;
	pix->bytesperline = 0;
	pix->priv = 0;

	return 0;
}
@@ -934,7 +933,6 @@ static int solo_enc_get_fmt_cap(struct file *file, void *priv,
		     V4L2_FIELD_NONE;
	pix->sizeimage = FRAME_BUF_SIZE;
	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
	pix->priv = 0;

	return 0;
}
+0 −2
Original line number Diff line number Diff line
@@ -477,7 +477,6 @@ static int solo_try_fmt_cap(struct file *file, void *priv,
	pix->field = V4L2_FIELD_INTERLACED;
	pix->pixelformat = V4L2_PIX_FMT_UYVY;
	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
	pix->priv = 0;
	return 0;
}

@@ -507,7 +506,6 @@ static int solo_get_fmt_cap(struct file *file, void *priv,
	pix->sizeimage = solo_image_size(solo_dev);
	pix->colorspace = V4L2_COLORSPACE_SMPTE170M;
	pix->bytesperline = solo_bytesperline(solo_dev);
	pix->priv = 0;

	return 0;
}
+0 −1
Original line number Diff line number Diff line
@@ -582,7 +582,6 @@ static int tw68_g_fmt_vid_cap(struct file *file, void *priv,
	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;
}

+0 −1
Original line number Diff line number Diff line
@@ -972,7 +972,6 @@ static int vpif_try_fmt_vid_cap(struct file *file, void *priv,
		pixfmt->bytesperline = common->fmt.fmt.pix.width * 2;
		pixfmt->sizeimage = pixfmt->bytesperline * pixfmt->height;
	}
	pixfmt->priv = 0;

	dev_dbg(vpif_dev, "%s: %d x %d; pitch=%d pixelformat=0x%08x, field=%d, size=%d\n", __func__,
		pixfmt->width, pixfmt->height,
Loading