Commit a9112683 authored by Hans Verkuil's avatar Hans Verkuil Committed by Mauro Carvalho Chehab

media: media/common/saa7146: 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: default avatarHans Verkuil <hverkuil-cisco@xs4all.nl>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab+huawei@kernel.org>
parent 7fbbbc78
...@@ -294,7 +294,7 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma) ...@@ -294,7 +294,7 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
int res; int res;
switch (vdev->vfl_type) { switch (vdev->vfl_type) {
case VFL_TYPE_GRABBER: { case VFL_TYPE_VIDEO: {
DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n", DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",
file, vma); file, vma);
q = &fh->video_q; q = &fh->video_q;
...@@ -376,7 +376,7 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof ...@@ -376,7 +376,7 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
int ret; int ret;
switch (vdev->vfl_type) { switch (vdev->vfl_type) {
case VFL_TYPE_GRABBER: case VFL_TYPE_VIDEO:
/* /*
DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun", DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, data:%p, count:%lun",
file, data, (unsigned long)count); file, data, (unsigned long)count);
...@@ -407,7 +407,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou ...@@ -407,7 +407,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou
int ret; int ret;
switch (vdev->vfl_type) { switch (vdev->vfl_type) {
case VFL_TYPE_GRABBER: case VFL_TYPE_VIDEO:
return -EINVAL; return -EINVAL;
case VFL_TYPE_VBI: case VFL_TYPE_VBI:
if (fh->dev->ext_vv_data->vbi_fops.write) { if (fh->dev->ext_vv_data->vbi_fops.write) {
...@@ -595,7 +595,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev, ...@@ -595,7 +595,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev,
DEB_EE("dev:%p, name:'%s', type:%d\n", dev, name, type); DEB_EE("dev:%p, name:'%s', type:%d\n", dev, name, type);
vfd->fops = &video_fops; vfd->fops = &video_fops;
if (type == VFL_TYPE_GRABBER) if (type == VFL_TYPE_VIDEO)
vfd->ioctl_ops = &dev->ext_vv_data->vid_ops; vfd->ioctl_ops = &dev->ext_vv_data->vid_ops;
else else
vfd->ioctl_ops = &dev->ext_vv_data->vbi_ops; vfd->ioctl_ops = &dev->ext_vv_data->vbi_ops;
...@@ -609,7 +609,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev, ...@@ -609,7 +609,7 @@ int saa7146_register_device(struct video_device *vfd, struct saa7146_dev *dev,
vfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OVERLAY | vfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OVERLAY |
V4L2_CAP_READWRITE | V4L2_CAP_STREAMING; V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
vfd->device_caps |= dev->ext_vv_data->capabilities; vfd->device_caps |= dev->ext_vv_data->capabilities;
if (type == VFL_TYPE_GRABBER) if (type == VFL_TYPE_VIDEO)
vfd->device_caps &= vfd->device_caps &=
~(V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_OUTPUT); ~(V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_OUTPUT);
else else
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment