]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
V4L/DVB (7665): videodev: Add default vidioc handler
authorDouglas Schilling Landgraf <dougsland@gmail.com>
Thu, 10 Apr 2008 04:18:56 +0000 (01:18 -0300)
committerMauro Carvalho Chehab <mchehab@infradead.org>
Thu, 24 Apr 2008 17:09:45 +0000 (14:09 -0300)
Added default vidioc handler for other private ioctls

Signed-off-by: Douglas Schilling Landgraf <dougsland@gmail.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
drivers/media/video/videodev.c
include/media/v4l2-dev.h

index effcd2ae4152db573e773e10c35d9f5b224f924c..31e8af0ba2785e105e60587b8153602b948f55eb 100644 (file)
@@ -1861,6 +1861,13 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
                        dbgarg (cmd, "chip_ident=%u, revision=0x%x\n", p->ident, p->revision);
                break;
        }
+       default:
+       {
+               if (!vfd->vidioc_default)
+                       break;
+               ret = vfd->vidioc_default(file, fh, cmd, arg);
+               break;
+       }
        } /* switch */
 
        if (vfd->debug & V4L2_DEBUG_IOCTL_ARG) {
index f2114459995d94826b9530e3a4f9c6feea1e5b00..a807d2f86ee849a5201ebfffc3ea54ff5c66e32e 100644 (file)
@@ -318,6 +318,10 @@ struct video_device
        int (*vidioc_g_chip_ident)     (struct file *file, void *fh,
                                        struct v4l2_chip_ident *chip);
 
+       /* For other private ioctls */
+       int (*vidioc_default)          (struct file *file, void *fh,
+                                       int cmd, void *arg);
+
 
 #ifdef OBSOLETE_OWNER /* to be removed soon */
 /* obsolete -- fops->owner is used instead */