Commit 3bc85cce authored by Frank Schaefer's avatar Frank Schaefer Committed by Mauro Carvalho Chehab

[media] em28xx: use v4l2_disable_ioctl() to disable ioctl VIDIOC_S_PARM

Instead of checking the device type and returning -ENOTTY inside the ioctl
function, use v4l2_disable_ioctl() to disable the ioctl VIDIOC_S_PARM if the
device is not a camera.
Signed-off-by: default avatarFrank Schäfer <fschaefer.oss@googlemail.com>
Acked-by: default avatarHans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: default avatarMauro Carvalho Chehab <mchehab@redhat.com>
parent c2dcef83
......@@ -1044,9 +1044,6 @@ static int vidioc_s_parm(struct file *file, void *priv,
struct em28xx_fh *fh = priv;
struct em28xx *dev = fh->dev;
if (!dev->board.is_webcam)
return -ENOTTY;
if (p->type != V4L2_BUF_TYPE_VIDEO_CAPTURE)
return -EINVAL;
......@@ -1891,6 +1888,8 @@ int em28xx_register_analog_devices(struct em28xx *dev)
v4l2_disable_ioctl(dev->vdev, VIDIOC_QUERYSTD);
v4l2_disable_ioctl(dev->vdev, VIDIOC_G_STD);
v4l2_disable_ioctl(dev->vdev, VIDIOC_S_STD);
} else {
v4l2_disable_ioctl(dev->vdev, VIDIOC_S_PARM);
}
if (dev->tuner_type == TUNER_ABSENT) {
v4l2_disable_ioctl(dev->vdev, VIDIOC_G_TUNER);
......
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