media: media/pci: rename VFL_TYPE_GRABBER to _VIDEO
'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: Hans Verkuil <hverkuil-cisco@xs4all.nl> Signed-off-by: Mauro Carvalho Chehab <mchehab+huawei@kernel.org>
This commit is contained in:
Родитель
6347953e0d
Коммит
3e30a927af
|
@ -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",
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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,
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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",
|
||||
|
|
|
@ -757,7 +757,7 @@ int cx25821_video_register(struct cx25821_dev *dev)
|
|||
snprintf(vdev->name, sizeof(vdev->name), "%s #%d", dev->name, i);
|
||||
video_set_drvdata(vdev, chan);
|
||||
|
||||
err = video_register_device(vdev, VFL_TYPE_GRABBER,
|
||||
err = video_register_device(vdev, VFL_TYPE_VIDEO,
|
||||
video_nr[dev->nr]);
|
||||
|
||||
if (err < 0)
|
||||
|
|
|
@ -1138,7 +1138,7 @@ static int blackbird_register_video(struct cx8802_dev *dev)
|
|||
V4L2_CAP_VIDEO_CAPTURE;
|
||||
if (dev->core->board.tuner_type != UNSET)
|
||||
dev->mpeg_dev.device_caps |= V4L2_CAP_TUNER;
|
||||
err = video_register_device(&dev->mpeg_dev, VFL_TYPE_GRABBER, -1);
|
||||
err = video_register_device(&dev->mpeg_dev, VFL_TYPE_VIDEO, -1);
|
||||
if (err < 0) {
|
||||
pr_info("can't register mpeg device\n");
|
||||
return err;
|
||||
|
|
|
@ -1451,7 +1451,7 @@ static int cx8800_initdev(struct pci_dev *pci_dev,
|
|||
V4L2_CAP_VIDEO_CAPTURE;
|
||||
if (core->board.tuner_type != UNSET)
|
||||
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[core->nr]);
|
||||
if (err < 0) {
|
||||
pr_err("can't register video device\n");
|
||||
|
|
|
@ -550,7 +550,7 @@ static int dt3155_probe(struct pci_dev *pdev, const struct pci_device_id *id)
|
|||
IRQF_SHARED, DT3155_NAME, pd);
|
||||
if (err)
|
||||
goto err_iounmap;
|
||||
err = video_register_device(&pd->vdev, VFL_TYPE_GRABBER, -1);
|
||||
err = video_register_device(&pd->vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (err)
|
||||
goto err_free_irq;
|
||||
dev_info(&pdev->dev, "/dev/video%i is ready\n", pd->vdev.minor);
|
||||
|
|
|
@ -1647,7 +1647,7 @@ static int cio2_queue_init(struct cio2_device *cio2, struct cio2_queue *q)
|
|||
vdev->queue = &q->vbq;
|
||||
vdev->device_caps = V4L2_CAP_VIDEO_CAPTURE_MPLANE | V4L2_CAP_STREAMING;
|
||||
video_set_drvdata(vdev, cio2);
|
||||
r = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
|
||||
r = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (r) {
|
||||
dev_err(&cio2->pci_dev->dev,
|
||||
"failed to register video device (%d)\n", r);
|
||||
|
|
|
@ -99,7 +99,7 @@ static struct {
|
|||
} ivtv_stream_info[] = {
|
||||
{ /* IVTV_ENC_STREAM_TYPE_MPG */
|
||||
"encoder MPG",
|
||||
VFL_TYPE_GRABBER, 0,
|
||||
VFL_TYPE_VIDEO, 0,
|
||||
PCI_DMA_FROMDEVICE, 0,
|
||||
V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
|
||||
V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
|
||||
|
@ -107,7 +107,7 @@ static struct {
|
|||
},
|
||||
{ /* IVTV_ENC_STREAM_TYPE_YUV */
|
||||
"encoder YUV",
|
||||
VFL_TYPE_GRABBER, IVTV_V4L2_ENC_YUV_OFFSET,
|
||||
VFL_TYPE_VIDEO, IVTV_V4L2_ENC_YUV_OFFSET,
|
||||
PCI_DMA_FROMDEVICE, 0,
|
||||
V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_TUNER |
|
||||
V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
|
||||
|
@ -123,7 +123,7 @@ static struct {
|
|||
},
|
||||
{ /* IVTV_ENC_STREAM_TYPE_PCM */
|
||||
"encoder PCM",
|
||||
VFL_TYPE_GRABBER, IVTV_V4L2_ENC_PCM_OFFSET,
|
||||
VFL_TYPE_VIDEO, IVTV_V4L2_ENC_PCM_OFFSET,
|
||||
PCI_DMA_FROMDEVICE, 0,
|
||||
V4L2_CAP_TUNER | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
|
||||
&ivtv_v4l2_enc_fops
|
||||
|
@ -137,7 +137,7 @@ static struct {
|
|||
},
|
||||
{ /* IVTV_DEC_STREAM_TYPE_MPG */
|
||||
"decoder MPG",
|
||||
VFL_TYPE_GRABBER, IVTV_V4L2_DEC_MPG_OFFSET,
|
||||
VFL_TYPE_VIDEO, IVTV_V4L2_DEC_MPG_OFFSET,
|
||||
PCI_DMA_TODEVICE, 0,
|
||||
V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
|
||||
&ivtv_v4l2_dec_fops
|
||||
|
@ -158,7 +158,7 @@ static struct {
|
|||
},
|
||||
{ /* IVTV_DEC_STREAM_TYPE_YUV */
|
||||
"decoder YUV",
|
||||
VFL_TYPE_GRABBER, IVTV_V4L2_DEC_YUV_OFFSET,
|
||||
VFL_TYPE_VIDEO, IVTV_V4L2_DEC_YUV_OFFSET,
|
||||
PCI_DMA_TODEVICE, 0,
|
||||
V4L2_CAP_VIDEO_OUTPUT | V4L2_CAP_AUDIO | V4L2_CAP_READWRITE,
|
||||
&ivtv_v4l2_dec_fops
|
||||
|
@ -318,7 +318,7 @@ static int ivtv_reg_dev(struct ivtv *itv, int type)
|
|||
name = video_device_node_name(&s->vdev);
|
||||
|
||||
switch (vfl_type) {
|
||||
case VFL_TYPE_GRABBER:
|
||||
case VFL_TYPE_VIDEO:
|
||||
IVTV_INFO("Registered device %s for %s (%d kB)\n",
|
||||
name, s->name, itv->options.kilobytes[type]);
|
||||
break;
|
||||
|
|
|
@ -1711,7 +1711,7 @@ static int meye_probe(struct pci_dev *pcidev, const struct pci_device_id *ent)
|
|||
v4l2_ctrl_handler_setup(&meye.hdl);
|
||||
meye.vdev.ctrl_handler = &meye.hdl;
|
||||
|
||||
if (video_register_device(&meye.vdev, VFL_TYPE_GRABBER,
|
||||
if (video_register_device(&meye.vdev, VFL_TYPE_VIDEO,
|
||||
video_nr) < 0) {
|
||||
v4l2_err(v4l2_dev, "video_register_device failed\n");
|
||||
goto outvideoreg;
|
||||
|
|
|
@ -1214,7 +1214,7 @@ static int saa7134_initdev(struct pci_dev *pci_dev,
|
|||
if (saa7134_no_overlay <= 0)
|
||||
dev->video_dev->device_caps |= V4L2_CAP_VIDEO_OVERLAY;
|
||||
|
||||
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",
|
||||
|
|
|
@ -291,7 +291,7 @@ static int empress_init(struct saa7134_dev *dev)
|
|||
dev->empress_dev->device_caps |= V4L2_CAP_TUNER;
|
||||
|
||||
video_set_drvdata(dev->empress_dev, dev);
|
||||
err = video_register_device(dev->empress_dev,VFL_TYPE_GRABBER,
|
||||
err = video_register_device(dev->empress_dev,VFL_TYPE_VIDEO,
|
||||
empress_nr[dev->nr]);
|
||||
if (err < 0) {
|
||||
pr_info("%s: can't register video device\n",
|
||||
|
|
|
@ -289,7 +289,7 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
|
|||
vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
|
||||
vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
|
||||
vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
|
||||
ret = saa7146_register_device(&hexium->video_dev, dev, "hexium gemini", VFL_TYPE_GRABBER);
|
||||
ret = saa7146_register_device(&hexium->video_dev, dev, "hexium gemini", VFL_TYPE_VIDEO);
|
||||
if (ret < 0) {
|
||||
pr_err("cannot register capture v4l2 device. skipping.\n");
|
||||
saa7146_vv_release(dev);
|
||||
|
|
|
@ -362,7 +362,7 @@ static int hexium_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_d
|
|||
vv_data.vid_ops.vidioc_enum_input = vidioc_enum_input;
|
||||
vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
|
||||
vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
|
||||
if (0 != saa7146_register_device(&hexium->video_dev, dev, "hexium orion", VFL_TYPE_GRABBER)) {
|
||||
if (0 != saa7146_register_device(&hexium->video_dev, dev, "hexium orion", VFL_TYPE_VIDEO)) {
|
||||
pr_err("cannot register capture v4l2 device. skipping.\n");
|
||||
return -1;
|
||||
}
|
||||
|
|
|
@ -707,7 +707,7 @@ static int mxb_attach(struct saa7146_dev *dev, struct saa7146_pci_extension_data
|
|||
vv_data.vid_ops.vidioc_g_register = vidioc_g_register;
|
||||
vv_data.vid_ops.vidioc_s_register = vidioc_s_register;
|
||||
#endif
|
||||
if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_GRABBER)) {
|
||||
if (saa7146_register_device(&mxb->video_dev, dev, "mxb", VFL_TYPE_VIDEO)) {
|
||||
ERR("cannot register capture v4l2 device. skipping.\n");
|
||||
saa7146_vv_release(dev);
|
||||
return -1;
|
||||
|
|
|
@ -1087,7 +1087,7 @@ int saa7164_encoder_register(struct saa7164_port *port)
|
|||
v4l2_ctrl_handler_setup(hdl);
|
||||
video_set_drvdata(port->v4l_device, port);
|
||||
result = video_register_device(port->v4l_device,
|
||||
VFL_TYPE_GRABBER, -1);
|
||||
VFL_TYPE_VIDEO, -1);
|
||||
if (result < 0) {
|
||||
printk(KERN_INFO "%s: can't register mpeg device\n",
|
||||
dev->name);
|
||||
|
|
|
@ -1304,7 +1304,7 @@ static struct solo_enc_dev *solo_enc_alloc(struct solo_dev *solo_dev,
|
|||
solo_enc->vfd->queue = &solo_enc->vidq;
|
||||
solo_enc->vfd->lock = &solo_enc->lock;
|
||||
video_set_drvdata(solo_enc->vfd, solo_enc);
|
||||
ret = video_register_device(solo_enc->vfd, VFL_TYPE_GRABBER, nr);
|
||||
ret = video_register_device(solo_enc->vfd, VFL_TYPE_VIDEO, nr);
|
||||
if (ret < 0)
|
||||
goto vdev_release;
|
||||
|
||||
|
|
|
@ -692,7 +692,7 @@ int solo_v4l2_init(struct solo_dev *solo_dev, unsigned nr)
|
|||
while (erase_off(solo_dev))
|
||||
/* Do nothing */;
|
||||
|
||||
ret = video_register_device(solo_dev->vfd, VFL_TYPE_GRABBER, nr);
|
||||
ret = video_register_device(solo_dev->vfd, VFL_TYPE_VIDEO, nr);
|
||||
if (ret < 0)
|
||||
goto fail;
|
||||
|
||||
|
|
|
@ -1069,7 +1069,7 @@ static int sta2x11_vip_init_one(struct pci_dev *pdev,
|
|||
vip->video_dev.lock = &vip->v4l_lock;
|
||||
video_set_drvdata(&vip->video_dev, vip);
|
||||
|
||||
ret = video_register_device(&vip->video_dev, VFL_TYPE_GRABBER, -1);
|
||||
ret = video_register_device(&vip->video_dev, VFL_TYPE_VIDEO, -1);
|
||||
if (ret)
|
||||
goto vrelease;
|
||||
|
||||
|
|
|
@ -831,7 +831,7 @@ int av7110_init_v4l(struct av7110 *av7110)
|
|||
if (FW_VERSION(av7110->arm_app) < 0x2623)
|
||||
vv_data->capabilities &= ~V4L2_CAP_SLICED_VBI_OUTPUT;
|
||||
|
||||
if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_GRABBER)) {
|
||||
if (saa7146_register_device(&av7110->v4l_dev, dev, "av7110", VFL_TYPE_VIDEO)) {
|
||||
ERR("cannot register capture device. skipping\n");
|
||||
saa7146_vv_release(dev);
|
||||
return -ENODEV;
|
||||
|
|
|
@ -1470,7 +1470,7 @@ static int budget_av_attach(struct saa7146_dev *dev, struct saa7146_pci_extensio
|
|||
vv_data.vid_ops.vidioc_g_input = vidioc_g_input;
|
||||
vv_data.vid_ops.vidioc_s_input = vidioc_s_input;
|
||||
|
||||
if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_GRABBER))) {
|
||||
if ((err = saa7146_register_device(&budget_av->vd, dev, "knc1", VFL_TYPE_VIDEO))) {
|
||||
/* fixme: proper cleanup here */
|
||||
ERR("cannot register capture v4l2 device\n");
|
||||
saa7146_vv_release(dev);
|
||||
|
|
|
@ -1156,7 +1156,7 @@ static int tw5864_video_input_init(struct tw5864_input *input, int video_nr)
|
|||
input->gop = GOP_SIZE;
|
||||
input->frame_interval = 1;
|
||||
|
||||
ret = video_register_device(&input->vdev, VFL_TYPE_GRABBER, video_nr);
|
||||
ret = video_register_device(&input->vdev, VFL_TYPE_VIDEO, video_nr);
|
||||
if (ret)
|
||||
goto free_v4l2_hdl;
|
||||
|
||||
|
|
|
@ -962,7 +962,7 @@ int tw68_video_init2(struct tw68_dev *dev, int video_nr)
|
|||
dev->vdev.lock = &dev->lock;
|
||||
dev->vdev.queue = &dev->vidq;
|
||||
video_set_drvdata(&dev->vdev, dev);
|
||||
return video_register_device(&dev->vdev, VFL_TYPE_GRABBER, video_nr);
|
||||
return video_register_device(&dev->vdev, VFL_TYPE_VIDEO, video_nr);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -1282,7 +1282,7 @@ int tw686x_video_init(struct tw686x_dev *dev)
|
|||
vc->device = vdev;
|
||||
video_set_drvdata(vdev, vc);
|
||||
|
||||
err = video_register_device(vdev, VFL_TYPE_GRABBER, -1);
|
||||
err = video_register_device(vdev, VFL_TYPE_VIDEO, -1);
|
||||
if (err < 0)
|
||||
goto error;
|
||||
vc->num = vdev->num;
|
||||
|
|
Загрузка…
Ссылка в новой задаче