[media] cx18: don't mess with vfd->debug
authorHans Verkuil <hans.verkuil@cisco.com>
Sat, 9 Jun 2012 13:54:19 +0000 (10:54 -0300)
committerMauro Carvalho Chehab <mchehab@redhat.com>
Fri, 6 Jul 2012 20:27:23 +0000 (17:27 -0300)
This is now controlled by sysfs.

Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
drivers/media/video/cx18/cx18-ioctl.c
drivers/media/video/cx18/cx18-ioctl.h
drivers/media/video/cx18/cx18-streams.c

index 35fde4e931f5c4c4b7c97e7303d229acf3b35500..e9912db3b496ae69618b411896fe054ba35d4827 100644 (file)
@@ -1142,24 +1142,6 @@ static long cx18_default(struct file *file, void *fh, bool valid_prio,
        return 0;
 }
 
-long cx18_v4l2_ioctl(struct file *filp, unsigned int cmd,
-                   unsigned long arg)
-{
-       struct video_device *vfd = video_devdata(filp);
-       struct cx18_open_id *id = file2id(filp);
-       struct cx18 *cx = id->cx;
-       long res;
-
-       mutex_lock(&cx->serialize_lock);
-
-       if (cx18_debug & CX18_DBGFLG_IOCTL)
-               vfd->debug = V4L2_DEBUG_IOCTL | V4L2_DEBUG_IOCTL_ARG;
-       res = video_ioctl2(filp, cmd, arg);
-       vfd->debug = 0;
-       mutex_unlock(&cx->serialize_lock);
-       return res;
-}
-
 static const struct v4l2_ioctl_ops cx18_ioctl_ops = {
        .vidioc_querycap                = cx18_querycap,
        .vidioc_s_audio                 = cx18_s_audio,
index dcb2559ad52050dbaeb0420bff74ed8ebae660f4..2f9dd591ee0f9421d95610756b91b43fbb419674 100644 (file)
@@ -29,5 +29,3 @@ void cx18_set_funcs(struct video_device *vdev);
 int cx18_s_std(struct file *file, void *fh, v4l2_std_id *std);
 int cx18_s_frequency(struct file *file, void *fh, struct v4l2_frequency *vf);
 int cx18_s_input(struct file *file, void *fh, unsigned int inp);
-long cx18_v4l2_ioctl(struct file *filp, unsigned int cmd,
-                   unsigned long arg);
index 4185bcb80ca3fb01c45c0d9b97b9139c087b94b8..9d598ab88615c07a82103010e6cb9c5a1e19600d 100644 (file)
@@ -40,8 +40,7 @@ static struct v4l2_file_operations cx18_v4l2_enc_fops = {
        .owner = THIS_MODULE,
        .read = cx18_v4l2_read,
        .open = cx18_v4l2_open,
-       /* FIXME change to video_ioctl2 if serialization lock can be removed */
-       .unlocked_ioctl = cx18_v4l2_ioctl,
+       .unlocked_ioctl = video_ioctl2,
        .release = cx18_v4l2_close,
        .poll = cx18_v4l2_enc_poll,
        .mmap = cx18_v4l2_mmap,
@@ -376,6 +375,7 @@ static int cx18_prep_dev(struct cx18 *cx, int type)
        s->video_dev->fops = &cx18_v4l2_enc_fops;
        s->video_dev->release = video_device_release;
        s->video_dev->tvnorms = V4L2_STD_ALL;
+       s->video_dev->lock = &cx->serialize_lock;
        set_bit(V4L2_FL_USE_FH_PRIO, &s->video_dev->flags);
        cx18_set_funcs(s->video_dev);
        return 0;