Gitweb:     
http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=452c0fb46b1d68b1dae37cea7ccebd70a80397e4
Commit:     452c0fb46b1d68b1dae37cea7ccebd70a80397e4
Parent:     1088b1373506fd75d2ac80433b847f116b917bc9
Author:     Mauro Carvalho Chehab <[EMAIL PROTECTED]>
AuthorDate: Tue May 1 08:55:00 2007 -0300
Committer:  Mauro Carvalho Chehab <[EMAIL PROTECTED]>
CommitDate: Wed May 9 10:12:29 2007 -0300

    V4L/DVB (5569): Fix: v4l1_compat should be called only if V4L1_COMPAT
    
    Added also some explanations about V4L1 handling
    
    Signed-off-by: Mauro Carvalho Chehab <[EMAIL PROTECTED]>
---
 drivers/media/video/videodev.c |   14 +++++++++++++-
 1 files changed, 13 insertions(+), 1 deletions(-)

diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index f45c625..db4bee8 100644
--- a/drivers/media/video/videodev.c
+++ b/drivers/media/video/videodev.c
@@ -438,6 +438,12 @@ static int __video_do_ioctl(struct inode *inode, struct 
file *file,
        }
 
 #ifdef CONFIG_VIDEO_V4L1_COMPAT
+       /***********************************************************
+        Handles calls to the obsoleted V4L1 API
+        Due to the nature of VIDIOCGMBUF, each driver that supports
+        V4L1 should implement its own handler for this ioctl.
+        ***********************************************************/
+
        /* --- streaming capture ------------------------------------- */
        if (cmd == VIDIOCGMBUF) {
                struct video_mbuf *p=arg;
@@ -453,11 +459,17 @@ static int __video_do_ioctl(struct inode *inode, struct 
file *file,
                                                (unsigned long)p->offsets);
                return ret;
        }
-#endif
 
+       /********************************************************
+        All other V4L1 calls are handled by v4l1_compat module.
+        Those calls will be translated into V4L2 calls, and
+        __video_do_ioctl will be called again, with one or more
+        V4L2 ioctls.
+        ********************************************************/
        if (_IOC_TYPE(cmd)=='v')
                return v4l_compat_translate_ioctl(inode,file,cmd,arg,
                                                __video_do_ioctl);
+#endif
 
        switch(cmd) {
        /* --- capabilities ------------------------------------------ */
-
To unsubscribe from this list: send the line "unsubscribe git-commits-head" in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to