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

Commit 353f980a authored by Hans Verkuil's avatar Hans Verkuil Committed by Sasha Levin
Browse files

media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO



[ Upstream commit 3e30a927af3ca86f6556faf437da44ca8bcf54a4 ]

'GRABBER' is a weird name, all other types map to the /dev
device names. Rename to 'VIDEO' to be consistent with the
other types.

Signed-off-by: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Stable-dep-of: d0b07f712bf6 ("media: ttpci: fix two memleaks in budget_av_attach")
Signed-off-by: default avatarSasha Levin <sashal@kernel.org>
parent fa83fca5
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -2964,7 +2964,7 @@ static int bttv_open(struct file *file)

	dprintk("open dev=%s\n", video_device_node_name(vdev));

	if (vdev->vfl_type == VFL_TYPE_GRABBER) {
	if (vdev->vfl_type == VFL_TYPE_VIDEO) {
		type = V4L2_BUF_TYPE_VIDEO_CAPTURE;
	} else if (vdev->vfl_type == VFL_TYPE_VBI) {
		type = V4L2_BUF_TYPE_VBI_CAPTURE;
@@ -3905,7 +3905,7 @@ static int bttv_register_video(struct bttv *btv)
	if (no_overlay <= 0)
		btv->video_dev.device_caps |= V4L2_CAP_VIDEO_OVERLAY;

	if (video_register_device(&btv->video_dev, VFL_TYPE_GRABBER,
	if (video_register_device(&btv->video_dev, VFL_TYPE_VIDEO,
				  video_nr[btv->c.nr]) < 0)
		goto err;
	pr_info("%d: registered device %s\n",
+1 −1
Original line number Diff line number Diff line
@@ -1272,7 +1272,7 @@ static int cobalt_node_register(struct cobalt *cobalt, int node)
	video_set_drvdata(vdev, s);
	ret = vb2_queue_init(q);
	if (!s->is_audio && ret == 0)
		ret = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
		ret = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
	else if (!s->is_dummy)
		ret = cobalt_alsa_init(s);

+6 −6
Original line number Diff line number Diff line
@@ -48,19 +48,19 @@ static struct {
} cx18_stream_info[] = {
	{	/* CX18_ENC_STREAM_TYPE_MPG */
		"encoder MPEG",
		VFL_TYPE_GRABBER, 0,
		VFL_TYPE_VIDEO, 0,
		PCI_DMA_FROMDEVICE,
		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
		V4L2_CAP_AUDIO | V4L2_CAP_TUNER
	},
	{	/* CX18_ENC_STREAM_TYPE_TS */
		"TS",
		VFL_TYPE_GRABBER, -1,
		VFL_TYPE_VIDEO, -1,
		PCI_DMA_FROMDEVICE,
	},
	{	/* CX18_ENC_STREAM_TYPE_YUV */
		"encoder YUV",
		VFL_TYPE_GRABBER, CX18_V4L2_ENC_YUV_OFFSET,
		VFL_TYPE_VIDEO, CX18_V4L2_ENC_YUV_OFFSET,
		PCI_DMA_FROMDEVICE,
		V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_READWRITE |
		V4L2_CAP_STREAMING | V4L2_CAP_AUDIO | V4L2_CAP_TUNER
@@ -74,13 +74,13 @@ static struct {
	},
	{	/* CX18_ENC_STREAM_TYPE_PCM */
		"encoder PCM audio",
		VFL_TYPE_GRABBER, CX18_V4L2_ENC_PCM_OFFSET,
		VFL_TYPE_VIDEO, CX18_V4L2_ENC_PCM_OFFSET,
		PCI_DMA_FROMDEVICE,
		V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
	},
	{	/* CX18_ENC_STREAM_TYPE_IDX */
		"encoder IDX",
		VFL_TYPE_GRABBER, -1,
		VFL_TYPE_VIDEO, -1,
		PCI_DMA_FROMDEVICE,
	},
	{	/* CX18_ENC_STREAM_TYPE_RAD */
@@ -434,7 +434,7 @@ static int cx18_reg_dev(struct cx18 *cx, int type)
	name = video_device_node_name(&s->video_dev);

	switch (vfl_type) {
	case VFL_TYPE_GRABBER:
	case VFL_TYPE_VIDEO:
		CX18_INFO("Registered device %s for %s (%d x %d.%02d kB)\n",
			  name, s->name, cx->stream_buffers[type],
			  cx->stream_buf_size[type] / 1024,
+1 −1
Original line number Diff line number Diff line
@@ -1545,7 +1545,7 @@ int cx23885_417_register(struct cx23885_dev *dev)
	if (dev->tuner_type != TUNER_ABSENT)
		dev->v4l_device->device_caps |= V4L2_CAP_TUNER;
	err = video_register_device(dev->v4l_device,
		VFL_TYPE_GRABBER, -1);
		VFL_TYPE_VIDEO, -1);
	if (err < 0) {
		pr_info("%s: can't register mpeg device\n", dev->name);
		return err;
+1 −1
Original line number Diff line number Diff line
@@ -1304,7 +1304,7 @@ int cx23885_video_register(struct cx23885_dev *dev)
				      V4L2_CAP_AUDIO | V4L2_CAP_VIDEO_CAPTURE;
	if (dev->tuner_type != TUNER_ABSENT)
		dev->video_dev->device_caps |= V4L2_CAP_TUNER;
	err = video_register_device(dev->video_dev, VFL_TYPE_GRABBER,
	err = video_register_device(dev->video_dev, VFL_TYPE_VIDEO,
				    video_nr[dev->nr]);
	if (err < 0) {
		pr_info("%s: can't register video device\n",
Loading