]> err.no Git - linux-2.6/commitdiff
V4L/DVB (4860): Optimization of v4l1 handling
authorMauro Carvalho Chehab <mchehab@infradead.org>
Mon, 20 Nov 2006 15:13:25 +0000 (12:13 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Sun, 10 Dec 2006 11:05:00 +0000 (09:05 -0200)
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/videodev.c

index 9024ea2557fd61570fe7f1779cfcb308358300b6..ad42deebdc47c3dfffe37abd2b472e32bd5793c2 100644 (file)
@@ -428,6 +428,10 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
                v4l_print_ioctl(vfd->name, cmd);
        }
 
+       if (_IOC_TYPE(cmd)=='v')
+               return v4l_compat_translate_ioctl(inode,file,cmd,arg,
+                                               __video_do_ioctl);
+
        switch(cmd) {
        /* --- capabilities ------------------------------------------ */
        case VIDIOC_QUERYCAP:
@@ -1409,12 +1413,7 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
                ret=vfd->vidioc_log_status(file, fh);
                break;
        }
-
-       /* --- Others --------------------------------------------- */
-
-       default:
-               ret=v4l_compat_translate_ioctl(inode,file,cmd,arg,__video_do_ioctl);
-       }
+       } /* switch */
 
        if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) {
                if (ret<0) {