aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media/video/videodev.c
diff options
context:
space:
mode:
authorMauro Carvalho Chehab <mchehab@infradead.org>2007-05-01 07:55:00 -0400
committerMauro Carvalho Chehab <mchehab@infradead.org>2007-05-09 09:12:29 -0400
commit452c0fb46b1d68b1dae37cea7ccebd70a80397e4 (patch)
treee0d8a5eb7e6b0c9452be66c9ef72b1e26e1fc956 /drivers/media/video/videodev.c
parent1088b1373506fd75d2ac80433b847f116b917bc9 (diff)
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 <mchehab@infradead.org>
Diffstat (limited to 'drivers/media/video/videodev.c')
-rw-r--r--drivers/media/video/videodev.c14
1 files changed, 13 insertions, 1 deletions
diff --git a/drivers/media/video/videodev.c b/drivers/media/video/videodev.c
index f45c625a92f4..db4bee842745 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,
438 } 438 }
439 439
440#ifdef CONFIG_VIDEO_V4L1_COMPAT 440#ifdef CONFIG_VIDEO_V4L1_COMPAT
441 /***********************************************************
442 Handles calls to the obsoleted V4L1 API
443 Due to the nature of VIDIOCGMBUF, each driver that supports
444 V4L1 should implement its own handler for this ioctl.
445 ***********************************************************/
446
441 /* --- streaming capture ------------------------------------- */ 447 /* --- streaming capture ------------------------------------- */
442 if (cmd == VIDIOCGMBUF) { 448 if (cmd == VIDIOCGMBUF) {
443 struct video_mbuf *p=arg; 449 struct video_mbuf *p=arg;
@@ -453,11 +459,17 @@ static int __video_do_ioctl(struct inode *inode, struct file *file,
453 (unsigned long)p->offsets); 459 (unsigned long)p->offsets);
454 return ret; 460 return ret;
455 } 461 }
456#endif
457 462
463 /********************************************************
464 All other V4L1 calls are handled by v4l1_compat module.
465 Those calls will be translated into V4L2 calls, and
466 __video_do_ioctl will be called again, with one or more
467 V4L2 ioctls.
468 ********************************************************/
458 if (_IOC_TYPE(cmd)=='v') 469 if (_IOC_TYPE(cmd)=='v')
459 return v4l_compat_translate_ioctl(inode,file,cmd,arg, 470 return v4l_compat_translate_ioctl(inode,file,cmd,arg,
460 __video_do_ioctl); 471 __video_do_ioctl);
472#endif
461 473
462 switch(cmd) { 474 switch(cmd) {
463 /* --- capabilities ------------------------------------------ */ 475 /* --- capabilities ------------------------------------------ */