diff options
author | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-01 08:55:00 -0300 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@infradead.org> | 2007-05-01 08:55:00 -0300 |
commit | 56c99ea3cb0e6f418d38685a064b86a46dcb1c8d (patch) | |
tree | 1bc07f29232a6b0ab2ae588806100aa6b31c72ab /linux/drivers/media | |
parent | bba63974e25856bdb9e0bfa00b88d8f605051fce (diff) | |
download | mediapointer-dvb-s2-56c99ea3cb0e6f418d38685a064b86a46dcb1c8d.tar.gz mediapointer-dvb-s2-56c99ea3cb0e6f418d38685a064b86a46dcb1c8d.tar.bz2 |
Fix: v4l1_compat should be called only if V4L1_COMPAT
From: Mauro Carvalho Chehab <mchehab@infradead.org>
Added also some explanations about V4L1 handling
Signed-off-by: Mauro Carvalho Chehab <mchehab@infradead.org>
Diffstat (limited to 'linux/drivers/media')
-rw-r--r-- | linux/drivers/media/video/videodev.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/linux/drivers/media/video/videodev.c b/linux/drivers/media/video/videodev.c index bd503c5ef..b8e022aed 100644 --- a/linux/drivers/media/video/videodev.c +++ b/linux/drivers/media/video/videodev.c @@ -462,6 +462,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; @@ -477,11 +483,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 ------------------------------------------ */ |