media: media/common/saa7146: rename VFL_TYPE_GRABBER to _VIDEO
authorHans Verkuil <hverkuil-cisco@xs4all.nl>
Mon, 3 Feb 2020 11:41:15 +0000 (12:41 +0100)
committerMauro Carvalho Chehab <mchehab+huawei@kernel.org>
Mon, 24 Feb 2020 15:53:30 +0000 (16:53 +0100)
'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>
drivers/media/common/saa7146/saa7146_fops.c

index d7e83b55ddca6cd3d95159f147cecffd06eb9fa1..d6531874faa650f0e8367ac8d37e0490e299b7db 100644 (file)
@@ -294,7 +294,7 @@ static int fops_mmap(struct file *file, struct vm_area_struct * vma)
        int res;
 
        switch (vdev->vfl_type) {
-       case VFL_TYPE_GRABBER: {
+       case VFL_TYPE_VIDEO: {
                DEB_EE("V4L2_BUF_TYPE_VIDEO_CAPTURE: file:%p, vma:%p\n",
                       file, vma);
                q = &fh->video_q;
@@ -376,7 +376,7 @@ static ssize_t fops_read(struct file *file, char __user *data, size_t count, lof
        int ret;
 
        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",
                       file, data, (unsigned long)count);
@@ -407,7 +407,7 @@ static ssize_t fops_write(struct file *file, const char __user *data, size_t cou
        int ret;
 
        switch (vdev->vfl_type) {
-       case VFL_TYPE_GRABBER:
+       case VFL_TYPE_VIDEO:
                return -EINVAL;
        case VFL_TYPE_VBI:
                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,
        DEB_EE("dev:%p, name:'%s', type:%d\n", dev, name, type);
 
        vfd->fops = &video_fops;
-       if (type == VFL_TYPE_GRABBER)
+       if (type == VFL_TYPE_VIDEO)
                vfd->ioctl_ops = &dev->ext_vv_data->vid_ops;
        else
                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,
        vfd->device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OVERLAY |
                           V4L2_CAP_READWRITE | V4L2_CAP_STREAMING;
        vfd->device_caps |= dev->ext_vv_data->capabilities;
-       if (type == VFL_TYPE_GRABBER)
+       if (type == VFL_TYPE_VIDEO)
                vfd->device_caps &=
                        ~(V4L2_CAP_VBI_CAPTURE | V4L2_CAP_SLICED_VBI_OUTPUT);
        else